- suppress errors when fread() times out

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@154 21d32557-59b3-4da0-833f-c5933fad653e
This commit is contained in:
Jim Wigginton 2011-04-22 07:50:24 +00:00
parent b614ab4dc0
commit e42adbeaf9

View File

@ -1858,6 +1858,10 @@ class Net_SSH2 {
$raw = fread($this->fsock, $this->decrypt_block_size);
$stop = strtok(microtime(), ' ') + strtok('');
if (empty($raw)) {
return '';
}
if ($this->decrypt !== false) {
$raw = $this->decrypt->decrypt($raw);
}
@ -2013,6 +2017,10 @@ class Net_SSH2 {
return false;
}
if (empty($response)) {
return '';
}
extract(unpack('Ctype/Nchannel', $this->_string_shift($response, 5)));
switch ($this->channel_status[$channel]) {