From 6c33012a4ace88bf89076693e25f0826d63eb942 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Thu, 22 Nov 2012 12:11:15 -0600 Subject: [PATCH] Suppress further error messages if connection is prematurely disconnected --- phpseclib/Net/SSH2.php | 2 ++ 1 file changed, 2 insertions(+) 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; }