summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2017-08-11 14:35:00 +0200
committerUrban Müller2017-08-11 14:35:00 +0200
commitda34c035df9a140bbdfb40ac6ebe7354da3f5494 (patch)
tree9ab8b9c74165a072a838a33953b746c55d09ef1d
parent3cb19b313b2363ff326d2baa01bca13c55866deb (diff)
downloaditools-da34c035df9a140bbdfb40ac6ebe7354da3f5494.tar.gz
itools-da34c035df9a140bbdfb40ac6ebe7354da3f5494.tar.bz2
itools-da34c035df9a140bbdfb40ac6ebe7354da3f5494.zip
dont report errs if retries left
-rw-r--r--it_url.class8
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;