Avoid 100% CPU on curl_multi_exec
Never finishes (up to max_execlution_limit) on PHP 5.4.24. See http://nz1.php.net/curl_multi_exec#113002 and http://www.adrianworlddesign.com/Knowledge-Base/php/Download-content-with-cURL/Doing-curlmultiexec-the-right-way
This commit is contained in:
parent
815a1ad6db
commit
2bbcde2b64
|
@ -45,7 +45,8 @@ class ExternalURLCheck implements EnvironmentCheck {
|
||||||
// Execute the handles
|
// Execute the handles
|
||||||
do {
|
do {
|
||||||
$mrc = curl_multi_exec($mh, $active);
|
$mrc = curl_multi_exec($mh, $active);
|
||||||
} while ($mrc == CURLM_CALL_MULTI_PERFORM);
|
curl_multi_select($mh);
|
||||||
|
} while ($active > 0);
|
||||||
|
|
||||||
while ($active && $mrc == CURLM_OK) {
|
while ($active && $mrc == CURLM_OK) {
|
||||||
if (curl_multi_select($mh) != -1) {
|
if (curl_multi_select($mh) != -1) {
|
||||||
|
|
Loading…
Reference in New Issue