Merge pull request #1444 from tomsommer/patch-2

Remove error suppression from stream_select()
This commit is contained in:
terrafrost 2020-01-17 06:37:44 -06:00 committed by GitHub
commit cb87d1885b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1243,9 +1243,7 @@ class SSH2
$start = microtime(true);
$sec = floor($this->curTimeout);
$usec = 1000000 * ($this->curTimeout - $sec);
// on windows this returns a "Warning: Invalid CRT parameters detected" error
// 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) {
$this->is_timeout = true;
return false;
}