mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 11:37:33 +00:00
Merge branch '2.0' into 3.0
This commit is contained in:
commit
227cf21bbc
@ -705,7 +705,8 @@ class SFTP extends SSH2
|
||||
throw $e;
|
||||
}
|
||||
$this->canonicalize_paths = false;
|
||||
$this->reset_connection(NET_SSH2_DISCONNECT_CONNECTION_LOST);
|
||||
$this->reset_sftp();
|
||||
return $this->init_sftp_connection();
|
||||
}
|
||||
|
||||
$this->update_stat_cache($this->pwd, []);
|
||||
@ -3284,6 +3285,17 @@ 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
|
||||
*
|
||||
@ -3292,10 +3304,7 @@ class SFTP extends SSH2
|
||||
protected function reset_connection($reason)
|
||||
{
|
||||
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