fix: failed to close file stream in onedrive policy
This commit is contained in:
parent
55ea76e35e
commit
78f4a1eae9
1 changed files with 3 additions and 1 deletions
|
@ -592,7 +592,9 @@ class Client
|
|||
|
||||
public function sendFileChunk($url,$headers,$stream){
|
||||
$curl = self::_createCurl("");
|
||||
$close = 0;
|
||||
if(!is_resource($stream)){
|
||||
$close = 1;
|
||||
$options=[];
|
||||
$options = array_merge([
|
||||
'stream_back_end' => $this->_streamBackEnd,
|
||||
|
@ -629,7 +631,7 @@ class Client
|
|||
curl_setopt_array($curl, $options);
|
||||
|
||||
$data = $this->_processResult($curl);
|
||||
if (!is_resource($content)) {
|
||||
if (is_resource($close)) {
|
||||
fclose($stream);
|
||||
}
|
||||
return $data;
|
||||
|
|
Loading…
Add table
Reference in a new issue