summaryrefslogtreecommitdiff
path: root/it_url.class
diff options
context:
space:
mode:
authorNathan Gass2020-08-20 09:25:45 +0200
committerNathan Gass2020-08-20 09:25:45 +0200
commit78deb2cd664fa20af429086cb5c327583d9b0a67 (patch)
tree07134fe133cfa3ab08898c8a144800394e70bd4e /it_url.class
parenta21a7991a7fc21321b90614b609b316fca54daa7 (diff)
downloaditools-78deb2cd664fa20af429086cb5c327583d9b0a67.tar.gz
itools-78deb2cd664fa20af429086cb5c327583d9b0a67.tar.bz2
itools-78deb2cd664fa20af429086cb5c327583d9b0a67.zip
fix 3538e25, we should not leak memory per url
Diffstat (limited to 'it_url.class')
-rw-r--r--it_url.class3
1 files changed, 3 insertions, 0 deletions
diff --git a/it_url.class b/it_url.class
index 54128dd..8b2bd2b 100644
--- a/it_url.class
+++ b/it_url.class
@@ -421,12 +421,15 @@ static function get_multi($p=null)
if (it::match(self::$retryable, curl_getinfo($handles[$key], CURLINFO_RESPONSE_CODE)) && $retries[$key]++ < $p['retries'])
$sleepuntils[$key] = microtime(true) + $p['retrysleep'];
+ else
+ unset($urls[$key]);
$closehandle($key);
} else if($retries[$key]++ < $p['retries']) {
$closehandle($key); # closehandle must be called before addhandle as we use the same key
$sleepuntils[$key] = microtime(true) + $p['retrysleep'];
} else {
$results_unordered[$key] = false;
+ unset($urls[$key]);
$closehandle($key);
}