Close cURL handle before recursing, so that cookie file is flushed
This commit is contained in:
parent
135869fd1c
commit
2bb8b77123
|
@ -71,6 +71,7 @@ function fetch_url($url,$binary = false, &$redirects = 0, $timeout = 0, $accept_
|
||||||
|
|
||||||
$base = $s;
|
$base = $s;
|
||||||
$curl_info = @curl_getinfo($ch);
|
$curl_info = @curl_getinfo($ch);
|
||||||
|
@curl_close($ch);
|
||||||
$http_code = $curl_info['http_code'];
|
$http_code = $curl_info['http_code'];
|
||||||
logger('fetch_url '.$url.': '.$http_code." ".$s, LOGGER_DATA);
|
logger('fetch_url '.$url.': '.$http_code." ".$s, LOGGER_DATA);
|
||||||
$header = '';
|
$header = '';
|
||||||
|
@ -110,7 +111,6 @@ function fetch_url($url,$binary = false, &$redirects = 0, $timeout = 0, $accept_
|
||||||
|
|
||||||
$body = substr($s,strlen($header));
|
$body = substr($s,strlen($header));
|
||||||
$a->set_curl_headers($header);
|
$a->set_curl_headers($header);
|
||||||
@curl_close($ch);
|
|
||||||
|
|
||||||
$a->save_timestamp($stamp1, "network");
|
$a->save_timestamp($stamp1, "network");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue