Commit 8723d049 authored by Bas de Nooijer's avatar Bas de Nooijer Committed by GitHub

Merge pull request #467 from bjoernhaeuser/usleep

usleep after curl_multi_select -1
parents 429d2d9c c837441c
...@@ -156,12 +156,14 @@ class ParallelExecution extends AbstractPlugin ...@@ -156,12 +156,14 @@ class ParallelExecution extends AbstractPlugin
$timeout = $this->getOption('curlmultiselecttimeout'); $timeout = $this->getOption('curlmultiselecttimeout');
while ($active && $mrc == CURLM_OK) { while ($active && $mrc == CURLM_OK) {
if (curl_multi_select($multiHandle, $timeout) != -1) { if (curl_multi_select($multiHandle, $timeout) == -1) {
usleep(100);
}
do { do {
$mrc = curl_multi_exec($multiHandle, $active); $mrc = curl_multi_exec($multiHandle, $active);
} while ($mrc == CURLM_CALL_MULTI_PERFORM); } while ($mrc == CURLM_CALL_MULTI_PERFORM);
} }
}
$this->client->getEventDispatcher()->dispatch(Events::EXECUTE_END, new ExecuteEndEvent()); $this->client->getEventDispatcher()->dispatch(Events::EXECUTE_END, new ExecuteEndEvent());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment