Merge branch '3.0'

This commit is contained in:
terrafrost 2020-01-17 06:39:14 -06:00
commit 112a210f4d

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;
}
@ -3588,7 +3586,7 @@ class SSH2
$write = $except = null;
if (!$this->curTimeout) {
@stream_select($read, $write, $except, null);
stream_select($read, $write, $except, null);
} else {
if ($this->curTimeout < 0) {
$this->is_timeout = true;
@ -3601,8 +3599,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
if (!@stream_select($read, $write, $except, $sec, $usec) && !count($read)) {
if (!stream_select($read, $write, $except, $sec, $usec)) {
$this->is_timeout = true;
if ($client_channel == self::CHANNEL_EXEC && !$this->request_pty) {
$this->close_channel($client_channel);