mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 11:37:33 +00:00
Remove error suppression from stream_select()
Suppressing errors from stream_select() makes debugging timeouts extremely hard.
This commit is contained in:
parent
61ffe1a147
commit
e2841212cb
@ -1245,7 +1245,7 @@ class SSH2
|
|||||||
$usec = 1000000 * ($this->curTimeout - $sec);
|
$usec = 1000000 * ($this->curTimeout - $sec);
|
||||||
// on windows this returns a "Warning: Invalid CRT parameters detected" error
|
// on windows this returns a "Warning: Invalid CRT parameters detected" error
|
||||||
// the !count() is done as a workaround for <https://bugs.php.net/42682>
|
// the !count() is done as a workaround for <https://bugs.php.net/42682>
|
||||||
if (!@stream_select($read, $write, $except, $sec, $usec) && !count($read)) {
|
if (stream_select($read, $write, $except, $sec, $usec) === false && !count($read)) {
|
||||||
$this->is_timeout = true;
|
$this->is_timeout = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user