diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 1d5655a1..c1ecae18 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -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 - 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; }