mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-11 08:10:58 +00:00
- add !is_resource() check
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@216 21d32557-59b3-4da0-833f-c5933fad653e
This commit is contained in:
parent
da8614a511
commit
9a7d6cdb54
@ -1900,7 +1900,7 @@ class Net_SSH2 {
|
|||||||
*/
|
*/
|
||||||
function _get_binary_packet()
|
function _get_binary_packet()
|
||||||
{
|
{
|
||||||
if (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);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -2215,7 +2215,7 @@ class Net_SSH2 {
|
|||||||
*/
|
*/
|
||||||
function _send_binary_packet($data)
|
function _send_binary_packet($data)
|
||||||
{
|
{
|
||||||
if (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);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user