mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 03:27:31 +00:00
Merge branch 'timeout-alt-2.0' into 2.0
This commit is contained in:
commit
51f2a9386b
@ -3894,7 +3894,7 @@ class SSH2
|
|||||||
$this->channel_buffers[$channel][] = $data;
|
$this->channel_buffers[$channel][] = $data;
|
||||||
break;
|
break;
|
||||||
case NET_SSH2_MSG_CHANNEL_CLOSE:
|
case NET_SSH2_MSG_CHANNEL_CLOSE:
|
||||||
$this->curTimeout = 0;
|
$this->curTimeout = 5;
|
||||||
|
|
||||||
if ($this->bitmap & self::MASK_SHELL) {
|
if ($this->bitmap & self::MASK_SHELL) {
|
||||||
$this->bitmap&= ~self::MASK_SHELL;
|
$this->bitmap&= ~self::MASK_SHELL;
|
||||||
@ -4123,11 +4123,15 @@ class SSH2
|
|||||||
|
|
||||||
$this->channel_status[$client_channel] = NET_SSH2_MSG_CHANNEL_CLOSE;
|
$this->channel_status[$client_channel] = NET_SSH2_MSG_CHANNEL_CLOSE;
|
||||||
|
|
||||||
$this->curTimeout = 0;
|
$this->curTimeout = 5;
|
||||||
|
|
||||||
while (!is_bool($this->_get_channel_packet($client_channel))) {
|
while (!is_bool($this->_get_channel_packet($client_channel))) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->is_timeout) {
|
||||||
|
$this->disconnect();
|
||||||
|
}
|
||||||
|
|
||||||
if ($want_reply) {
|
if ($want_reply) {
|
||||||
$this->_send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$client_channel]));
|
$this->_send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$client_channel]));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user