diff options
author | Christian Schneider | 2007-11-20 14:54:54 +0000 |
---|---|---|
committer | Christian Schneider | 2007-11-20 14:54:54 +0000 |
commit | bc15ede59f330ba6f41da754d68a6d44fb7e0237 (patch) | |
tree | 9883d30b438eb65673ce337a5a2649905db12adc /it_url.class | |
parent | 6fe91dfc107d55e3930d6ba4321d30a0c22ed9ff (diff) | |
download | itools-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.class | 1 |
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') |