diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 144eba40..ec44a55c 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -2000,6 +2000,7 @@ class Net_SSH2 { { if (!is_resource($this->fsock) || feof($this->fsock)) { user_error('Connection closed prematurely', E_USER_NOTICE); + $this->bitmask = 0; return false; } @@ -2345,6 +2346,7 @@ class Net_SSH2 { { if (!is_resource($this->fsock) || feof($this->fsock)) { user_error('Connection closed prematurely', E_USER_NOTICE); + $this->bitmask = 0; return false; }