diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 67524136..803cfd6b 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -467,6 +467,8 @@ class SFTP extends SSH2 $response = $this->_get_channel_packet(self::CHANNEL, true); if ($response === false) { return false; + } else if ($response === true && $this->isTimeout()) { + return false; } $packet = pack( @@ -513,6 +515,8 @@ class SFTP extends SSH2 if ($response === false) { return false; } + } else if ($response === true && $this->isTimeout()) { + return false; } $this->channel_status[self::CHANNEL] = NET_SSH2_MSG_CHANNEL_DATA;