SSH2: fix possible infinite loop on packet timeout

get_channel_packet() could call close_channel() which would call
get_channel_packet(), again, repeat ad nauseam
This commit is contained in:
terrafrost 2024-08-10 19:55:03 -05:00
parent 088803a9e3
commit 90eb0220af

View File

@ -4096,9 +4096,6 @@ class Net_SSH2
} else {
$response = $this->_get_binary_packet(true);
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) {