Merge pull request #588 from terrafrost/disconnect-fix

SSH2: update conditions under which _disconnect's code is executed

* terrafrost/disconnect-fix:
  SSH2: update conditions under which _disconnect's code is executed
This commit is contained in:
Andreas Fischer 2015-01-04 11:36:14 +01:00
commit ec21aa23f1

View File

@ -3277,7 +3277,7 @@ class 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;