From 472e006b6cbd38212ab3bd3bb87fba89d680b276 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Mon, 29 Dec 2014 08:37:44 -0600 Subject: [PATCH] SSH2: update conditions under which _disconnect's code is executed --- phpseclib/Net/SSH2.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index c904e678..75ecfc32 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -3372,7 +3372,7 @@ class Net_SSH2 */ function _disconnect($reason) { - if ($this->bitmap) { + if ($this->bitmap & NET_SSH2_MASK_CONNECTED) { $data = pack('CNNa*Na*', NET_SSH2_MSG_DISCONNECT, $reason, 0, '', 0, ''); $this->_send_binary_packet($data); $this->bitmap = 0;