mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-08 14:51:00 +00:00
Merge branch '3.0'
This commit is contained in:
commit
8214bd6079
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user