diff options
Diffstat (limited to 'it_url.class')
-rw-r--r-- | it_url.class | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/it_url.class b/it_url.class index 081c9ee..61f4475 100644 --- a/it_url.class +++ b/it_url.class @@ -262,7 +262,7 @@ function request($p=array()) if (time() >= $endtime) { $result = $this->result = false; - $errstr = $this->errstr = "totaltimeout (" . $p['totaltimeout'] . ") reached"; + $errstr = $this->errstr = "totaltimeout " . $p['totaltimeout'] . " reached"; } if ($p['maxlength'] && (strlen($this->data) + $len > $p['maxlength'])) { @@ -270,8 +270,8 @@ function request($p=array()) $errstr = $this->errstr = "maxlength reached"; } - if ($result === false) - it::error((array)$p['it_error'] + ['title' => "problem (timeout?) getting $url->url " . $errstr]); + if ($result === false && $p['retries'] <= 0) + it::error((array)$p['it_error'] + ['title' => "problem (" . ($errstr ?: "timeout?") . ") getting $url->url "]); return $result; } @@ -367,7 +367,7 @@ function request_curl($p=array()) $errstr = $this->errstr = curl_error($curl); } - if ($got === false) + if ($got === false && $p['retries'] <= 0) it::error((array)$p['it_error'] + ['title' => "problem getting $url->url with curl: " . curl_error($curl)]); return $result; |