mirror of
https://github.com/danog/phpseclib.git
synced 2024-11-30 04:39:21 +01:00
only auto close the channel for exec() timeouts
This commit is contained in:
parent
e942f9b1c3
commit
9015d987f7
@ -3815,7 +3815,9 @@ class Net_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 = strtok(microtime(), ' ') + strtok('') - $start;
|
||||
|
Loading…
Reference in New Issue
Block a user