mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-28 01:28:27 +00:00
Merge branch '1.0' into 2.0
This commit is contained in:
commit
afda7ebf95
@ -758,7 +758,8 @@ class SFTP extends SSH2
|
||||
return false;
|
||||
}
|
||||
$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, array());
|
||||
@ -3628,6 +3629,19 @@ class SFTP extends SSH2
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the SFTP channel for re-use
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
function _reset_sftp()
|
||||
{
|
||||
$this->use_request_id = false;
|
||||
$this->pwd = false;
|
||||
$this->requestBuffer = [];
|
||||
$this->partial_init = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets a connection for re-use
|
||||
*
|
||||
@ -3637,10 +3651,7 @@ class SFTP extends SSH2
|
||||
function _reset_connection($reason)
|
||||
{
|
||||
parent::_reset_connection($reason);
|
||||
$this->use_request_id = false;
|
||||
$this->pwd = false;
|
||||
$this->requestBuffer = array();
|
||||
$this->partial_init = false;
|
||||
$this->_reset_sftp();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user