From 228fb3ceb913e340c1d02808b60fe5e4316a43ed Mon Sep 17 00:00:00 2001 From: Jim Wigginton Date: Wed, 7 Mar 2012 18:57:45 +0000 Subject: [PATCH] - - close the channel when a NET_SSH2_CHANNEL_REQUEST exit-status is received (thanks, ferus!) git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@200 21d32557-59b3-4da0-833f-c5933fad653e --- phpseclib/Net/SSH2.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index a8d9e13d..a37922ed 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -2180,7 +2180,11 @@ class Net_SSH2 { if ($length) { $this->errors[count($this->errors)].= "\r\n" . $this->_string_shift($response, $length); } - //case 'exit-status': + case 'exit-status': + // "The channel needs to be closed with SSH_MSG_CHANNEL_CLOSE after this message." + // -- http://tools.ietf.org/html/rfc4254#section-6.10 + $this->_close_channel($client_channel); + return true; default: // "Some systems may not implement signals, in which case they SHOULD ignore this message." // -- http://tools.ietf.org/html/rfc4254#section-6.9