1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-03 18:18:05 +01:00

Suppress further error messages if connection is prematurely disconnected

This commit is contained in:
terrafrost 2012-11-22 12:11:15 -06:00
parent 2c85e6d07a
commit 6c33012a4a

View File

@ -2000,6 +2000,7 @@ class Net_SSH2 {
{ {
if (!is_resource($this->fsock) || feof($this->fsock)) { if (!is_resource($this->fsock) || feof($this->fsock)) {
user_error('Connection closed prematurely', E_USER_NOTICE); user_error('Connection closed prematurely', E_USER_NOTICE);
$this->bitmask = 0;
return false; return false;
} }
@ -2345,6 +2346,7 @@ class Net_SSH2 {
{ {
if (!is_resource($this->fsock) || feof($this->fsock)) { if (!is_resource($this->fsock) || feof($this->fsock)) {
user_error('Connection closed prematurely', E_USER_NOTICE); user_error('Connection closed prematurely', E_USER_NOTICE);
$this->bitmask = 0;
return false; return false;
} }