summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it_url.class7
1 files changed, 4 insertions, 3 deletions
diff --git a/it_url.class b/it_url.class
index 2739ba4..6fe3183 100644
--- a/it_url.class
+++ b/it_url.class
@@ -403,7 +403,6 @@ function get_multi($p=null)
$mrc = curl_multi_exec($mh, $active);
} while ($mrc == CURLM_CALL_MULTI_PERFORM);
- $results = array();
$timeout = 0.001; # Very short timeout to work around problem with first select call on cURL 7.25.0
while (!$abort && $active && $mrc == CURLM_OK)
{
@@ -419,9 +418,9 @@ function get_multi($p=null)
$key = $keys[$info['handle']];
EDC('reqtimings', $key, $info['result'], (microtime(true) - $start) * 1000);
if ($info['result'] == CURLE_OK)
- $results[$key] = curl_multi_getcontent($info['handle']);
+ $results_unordered[$key] = curl_multi_getcontent($info['handle']);
else
- $results[$key] = false;
+ $results_unordered[$key] = false;
if (($handler = $urls[$keys[$info['handle']]]['handler']))
$abort = $handler($info['result'], $results[$key]);
}
@@ -431,9 +430,11 @@ function get_multi($p=null)
$timeout = 0.1; # Longer delay to avoid busy loop but shorter than default of 1s in case we stil hit cURL 7.25.0 problem
}
+ $results = array();
foreach ($handles as $key => $handle) {
curl_multi_remove_handle($mh, $handle);
curl_close($handle);
+ $results[$key] = $results_unordered[$key];
}
curl_multi_close($mh);
return $results;