mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-29 04:23:34 +00:00
Merge branch 'keepalive-3.0' into keepalive-master
This commit is contained in:
commit
1f5d87212b
@ -3229,9 +3229,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)) {
|
if (!stream_select($read, $write, $except, $sec, $usec)) {
|
||||||
$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;
|
||||||
@ -3692,6 +3689,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->disconnect_helper(NET_SSH2_DISCONNECT_CONNECTION_LOST);
|
$this->disconnect_helper(NET_SSH2_DISCONNECT_CONNECTION_LOST);
|
||||||
throw new ConnectionClosedException('Connection closed by server');
|
throw new ConnectionClosedException('Connection closed by server');
|
||||||
|
Loading…
Reference in New Issue
Block a user