Merge branch '1.0' into 2.0

This commit is contained in:
terrafrost 2020-08-09 11:00:49 -05:00
commit ed20bba5e7

View File

@ -2980,6 +2980,10 @@ class SFTP extends SSH2
*/ */
function _send_sftp_packet($type, $data, $request_id = 1) function _send_sftp_packet($type, $data, $request_id = 1)
{ {
// in SSH2.php the timeout is cumulative per function call. eg. exec() will
// timeout after 10s. but for SFTP.php it's cumulative per packet
$this->curTimeout = $this->timeout;
$packet = $this->use_request_id ? $packet = $this->use_request_id ?
pack('NCNa*', strlen($data) + 5, $type, $request_id, $data) : pack('NCNa*', strlen($data) + 5, $type, $request_id, $data) :
pack('NCa*', strlen($data) + 1, $type, $data); pack('NCa*', strlen($data) + 1, $type, $data);