mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-25 19:21:09 +00:00
Merge branch 'keepalive-1.0' into keepalive-2.0
This commit is contained in:
commit
43b2708254
@ -3377,9 +3377,6 @@ class SSH2
|
|||||||
// on windows this returns a "Warning: Invalid CRT parameters detected" error
|
// on windows this returns a "Warning: Invalid CRT parameters detected" error
|
||||||
if (!@stream_select($read, $write, $except, $sec, $usec) && !count($read)) {
|
if (!@stream_select($read, $write, $except, $sec, $usec) && !count($read)) {
|
||||||
$this->is_timeout = true;
|
$this->is_timeout = true;
|
||||||
if ($client_channel == self::CHANNEL_EXEC && !$this->request_pty) {
|
|
||||||
$this->_close_channel($client_channel);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
$elapsed = microtime(true) - $start;
|
$elapsed = microtime(true) - $start;
|
||||||
@ -3747,6 +3744,9 @@ class SSH2
|
|||||||
$this->binary_packet_buffer = false;
|
$this->binary_packet_buffer = false;
|
||||||
} else {
|
} else {
|
||||||
$response = $this->_get_binary_packet(true);
|
$response = $this->_get_binary_packet(true);
|
||||||
|
if ($response === true && $this->is_timeout && $client_channel == self::CHANNEL_EXEC && !$this->request_pty) {
|
||||||
|
$this->_close_channel($client_channel);
|
||||||
|
}
|
||||||
if ($response === false) {
|
if ($response === false) {
|
||||||
$this->bitmap = 0;
|
$this->bitmap = 0;
|
||||||
user_error('Connection closed by server');
|
user_error('Connection closed by server');
|
||||||
|
Loading…
Reference in New Issue
Block a user