diff options
author | Christian Schneider | 2012-09-19 13:57:42 +0000 |
---|---|---|
committer | Christian Schneider | 2012-09-19 13:57:42 +0000 |
commit | 69185319fc4ca19675e9dff5ad0015f68ccf51c6 (patch) | |
tree | 095ca72d2f7ec74e2f1cd536fbabfe39cc980a6e /it_url.class | |
parent | 81a905d013fd8cf6fff14eb8db625741c7235b34 (diff) | |
download | itools-69185319fc4ca19675e9dff5ad0015f68ccf51c6.tar.gz itools-69185319fc4ca19675e9dff5ad0015f68ccf51c6.tar.bz2 itools-69185319fc4ca19675e9dff5ad0015f68ccf51c6.zip |
Added work-around for cURL 7.25.0 problem with first select call hanging
Diffstat (limited to 'it_url.class')
-rw-r--r-- | it_url.class | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/it_url.class b/it_url.class index 1b82278..1e61578 100644 --- a/it_url.class +++ b/it_url.class @@ -398,9 +398,10 @@ function get_multi($p=null) $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM); + $timeout = 0.001; # Very short timeout to work around problem with first select call on cURL 7.25.0 while ($active && $mrc == CURLM_OK) { - if (curl_multi_select($mh) != -1) + if (curl_multi_select($mh, $timeout) != -1) { do { $mrc = curl_multi_exec($mh, $active); @@ -416,6 +417,7 @@ function get_multi($p=null) } } while ($mrc == CURLM_CALL_MULTI_PERFORM); } + $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(); |