diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index dd7698d5..bcb25cde 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -3712,7 +3712,9 @@ class SSH2 // on windows this returns a "Warning: Invalid CRT parameters detected" error if (!@stream_select($read, $write, $except, $sec, $usec) && !count($read)) { $this->is_timeout = true; - $this->_close_channel($client_channel); + if ($client_channel == NET_SSH2_CHANNEL_EXEC && !$this->request_pty) { + $this->_close_channel($client_channel); + } return true; } $elapsed = microtime(true) - $start;