mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 11:37:33 +00:00
- send a NET_SSH2_MSG_CHANNEL_CLOSE packet in addition to a NET_SSH2_MSG_CHANNEL_EOF packet when force closing the channel (thanks, ferus!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@197 21d32557-59b3-4da0-833f-c5933fad653e
This commit is contained in:
parent
6d3e3dd12e
commit
329d3e2a15
@ -2123,9 +2123,7 @@ class Net_SSH2 {
|
||||
return $this->_disconnect(NET_SSH2_DISCONNECT_BY_APPLICATION);
|
||||
}
|
||||
case NET_SSH2_MSG_CHANNEL_CLOSE:
|
||||
$this->_send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$channel]));
|
||||
return $type != NET_SSH2_MSG_CHANNEL_CLOSE;
|
||||
|
||||
return $type == NET_SSH2_MSG_CHANNEL_CLOSE ? true : $this->_get_channel_packet($client_channel, $skip_extended);
|
||||
}
|
||||
|
||||
switch ($type) {
|
||||
@ -2350,12 +2348,9 @@ class Net_SSH2 {
|
||||
{
|
||||
// see http://tools.ietf.org/html/rfc4254#section-5.3
|
||||
|
||||
$packet = pack('CN',
|
||||
NET_SSH2_MSG_CHANNEL_EOF,
|
||||
$this->server_channels[$client_channel]);
|
||||
if (!$this->_send_binary_packet($packet)) {
|
||||
return false;
|
||||
}
|
||||
$this->_send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_EOF, $this->server_channels[$channel]));
|
||||
|
||||
$this->_send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$channel]));
|
||||
|
||||
$this->channel_status[$client_channel] = NET_SSH2_MSG_CHANNEL_CLOSE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user