summaryrefslogtreecommitdiff
path: root/it_url.class
diff options
context:
space:
mode:
authorChristian Schneider2007-11-20 14:54:54 +0000
committerChristian Schneider2007-11-20 14:54:54 +0000
commitbc15ede59f330ba6f41da754d68a6d44fb7e0237 (patch)
tree9883d30b438eb65673ce337a5a2649905db12adc /it_url.class
parent6fe91dfc107d55e3930d6ba4321d30a0c22ed9ff (diff)
downloaditools-bc15ede59f330ba6f41da754d68a6d44fb7e0237.tar.gz
itools-bc15ede59f330ba6f41da754d68a6d44fb7e0237.tar.bz2
itools-bc15ede59f330ba6f41da754d68a6d44fb7e0237.zip
Individual read operation timeout respects small totaltimeout now.
Note: totaltimeout preferable, should we rename parameters?
Diffstat (limited to 'it_url.class')
-rw-r--r--it_url.class1
1 files changed, 1 insertions, 0 deletions
diff --git a/it_url.class b/it_url.class
index f556ebb..cb0f0c9 100644
--- a/it_url.class
+++ b/it_url.class
@@ -243,6 +243,7 @@ function get($p=null, $timeout=5)
$url->result = $result = false;
unset($url->data);
$url->headers = array();
+ $p['timeout'] = min($p['timeout'], $p['totaltimeout']); # No operation may be longer than totaltimeout
$endtime = time() + $p['totaltimeout'];
if ($url->protocol == 'http')