Merge branch '3.0'

This commit is contained in:
terrafrost 2024-05-17 18:57:03 -05:00
commit 8214bd6079

View File

@ -503,7 +503,8 @@ class SFTP extends SSH2
throw $e;
}
$this->canonicalize_paths = false;
$this->reset_connection(DisconnectReason::CONNECTION_LOST);
$this->reset_sftp();
return $this->init_sftp_connection();
}
$this->update_stat_cache($this->pwd, []);
@ -2907,16 +2908,24 @@ class SFTP extends SSH2
}
}
/**
* Resets the SFTP channel for re-use
*/
private function reset_sftp()
{
$this->use_request_id = false;
$this->pwd = false;
$this->requestBuffer = [];
$this->partial_init = false;
}
/**
* Resets a connection for re-use
*/
protected function reset_connection(int $reason): void
{
parent::reset_connection($reason);
$this->use_request_id = false;
$this->pwd = false;
$this->requestBuffer = [];
$this->partial_init = false;
$this->reset_sftp();
}
/**