mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-28 11:09:26 +00:00
Move download complete handling to Curl::exec()
This commit is contained in:
@@ -385,6 +385,11 @@ class Curl
|
||||
|
||||
$this->call($this->completeFunction);
|
||||
|
||||
// Close open file handles and reset the curl instance.
|
||||
if (!($this->fileHandle === null)) {
|
||||
$this->downloadComplete($this->fileHandle);
|
||||
}
|
||||
|
||||
return $this->response;
|
||||
}
|
||||
|
||||
|
||||
@@ -543,11 +543,6 @@ class MultiCurl
|
||||
$ch->exec($ch->curl);
|
||||
curl_multi_remove_handle($this->multiCurl, $ch->curl);
|
||||
unset($this->curls[$key]);
|
||||
|
||||
// Close open file handles and reset the curl instance.
|
||||
if (!($ch->fileHandle === null)) {
|
||||
$ch->downloadComplete($ch->fileHandle);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user