Reset is_timeout when sending and receiving SFTP packets

This commit is contained in:
Robert 2024-07-12 15:01:35 -04:00
parent 35fcd1984b
commit d9d2ba59cd

View File

@ -3269,6 +3269,7 @@ class SFTP extends SSH2
// 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;
$this->is_timeout = false;
$packet = $this->use_request_id ?
pack('NCNa*', strlen($data) + 5, $type, $request_id, $data) :
@ -3331,6 +3332,7 @@ class SFTP extends SSH2
// 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;
$this->is_timeout = false;
$start = microtime(true);