From: Matthew Exon Date: Sun, 14 Sep 2014 03:00:33 +0000 (+0200) Subject: Close cURL handle before recursing, so that cookie file is flushed X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2bb8b77123453c053c3fffaf47ef91317d3161f0;p=friendica.git Close cURL handle before recursing, so that cookie file is flushed --- diff --git a/include/network.php b/include/network.php index 251de07c42..83d4c731a9 100644 --- a/include/network.php +++ b/include/network.php @@ -71,6 +71,7 @@ function fetch_url($url,$binary = false, &$redirects = 0, $timeout = 0, $accept_ $base = $s; $curl_info = @curl_getinfo($ch); + @curl_close($ch); $http_code = $curl_info['http_code']; logger('fetch_url '.$url.': '.$http_code." ".$s, LOGGER_DATA); $header = ''; @@ -110,7 +111,6 @@ function fetch_url($url,$binary = false, &$redirects = 0, $timeout = 0, $accept_ $body = substr($s,strlen($header)); $a->set_curl_headers($header); - @curl_close($ch); $a->save_timestamp($stamp1, "network");