multicurl - starting new requests while curls array is not empty and activeCurls array size less than concurrency

This commit is contained in:
agapov97
2018-02-26 17:21:21 +03:00
parent 53c45a6289
commit caf1ec2062
+1 -1
View File
@@ -696,7 +696,7 @@ class MultiCurl
unset($this->activeCurls[$key]);
// Start a new request before removing the handle of the completed one.
if (count($this->curls) >= 1) {
while (count($this->curls) >= 1 && count($this->activeCurls) < $this->concurrency) {
$this->initHandle(array_shift($this->curls));
}
curl_multi_remove_handle($this->multiCurl, $curl->curl);