From 8d567cdf29531bfb425e4f3f09d7b53cf2974924 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Wed, 16 Dec 2020 08:26:03 -0600 Subject: [PATCH] SSH2: keepalive tweak --- phpseclib/Net/SSH2.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index fb458466..5ebad708 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -3761,8 +3761,11 @@ class Net_SSH2 $this->binary_packet_buffer = false; } else { $response = $this->_get_binary_packet(true); - if ($response === true && $this->is_timeout && $client_channel == NET_SSH2_CHANNEL_EXEC && !$this->request_pty) { - $this->_close_channel($client_channel); + if ($response === true && $this->is_timeout)) { + if ($client_channel == NET_SSH2_CHANNEL_EXEC && !$this->request_pty) { + $this->_close_channel($client_channel); + } + return true; } if ($response === false) { $this->bitmap = 0;