Merge pull request #1387 from mexon/mat/mergerequest
Close cURL object earlier in fetch_url
This commit is contained in:
commit
ce8f965e11
1 changed files with 1 additions and 1 deletions
|
@ -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