summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Schneider2012-09-19 13:57:42 +0000
committerChristian Schneider2012-09-19 13:57:42 +0000
commit69185319fc4ca19675e9dff5ad0015f68ccf51c6 (patch)
tree095ca72d2f7ec74e2f1cd536fbabfe39cc980a6e
parent81a905d013fd8cf6fff14eb8db625741c7235b34 (diff)
downloaditools-69185319fc4ca19675e9dff5ad0015f68ccf51c6.tar.gz
itools-69185319fc4ca19675e9dff5ad0015f68ccf51c6.tar.bz2
itools-69185319fc4ca19675e9dff5ad0015f68ccf51c6.zip
Added work-around for cURL 7.25.0 problem with first select call hanging
-rw-r--r--it_url.class4
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();