mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-15 10:26:59 +01:00
Merge branch '3.0'
This commit is contained in:
commit
112a210f4d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user