mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-17 02:35:10 +00:00
SSH2: @stream_select -> stream_select
This commit is contained in:
parent
cb87d1885b
commit
6470d1c80e
@ -3586,7 +3586,7 @@ class SSH2
|
|||||||
$write = $except = null;
|
$write = $except = null;
|
||||||
|
|
||||||
if (!$this->curTimeout) {
|
if (!$this->curTimeout) {
|
||||||
@stream_select($read, $write, $except, null);
|
stream_select($read, $write, $except, null);
|
||||||
} else {
|
} else {
|
||||||
if ($this->curTimeout < 0) {
|
if ($this->curTimeout < 0) {
|
||||||
$this->is_timeout = true;
|
$this->is_timeout = true;
|
||||||
@ -3599,8 +3599,7 @@ class SSH2
|
|||||||
$start = microtime(true);
|
$start = microtime(true);
|
||||||
$sec = floor($this->curTimeout);
|
$sec = floor($this->curTimeout);
|
||||||
$usec = 1000000 * ($this->curTimeout - $sec);
|
$usec = 1000000 * ($this->curTimeout - $sec);
|
||||||
// on windows this returns a "Warning: Invalid CRT parameters detected" error
|
if (!stream_select($read, $write, $except, $sec, $usec)) {
|
||||||
if (!@stream_select($read, $write, $except, $sec, $usec) && !count($read)) {
|
|
||||||
$this->is_timeout = true;
|
$this->is_timeout = true;
|
||||||
if ($client_channel == self::CHANNEL_EXEC && !$this->request_pty) {
|
if ($client_channel == self::CHANNEL_EXEC && !$this->request_pty) {
|
||||||
$this->close_channel($client_channel);
|
$this->close_channel($client_channel);
|
||||||
|
Loading…
Reference in New Issue
Block a user