mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-15 17:57:12 +00:00
Merge branch '3.0'
This commit is contained in:
commit
fea0b235fe
@ -1347,8 +1347,8 @@ class SSH2
|
|||||||
$read = [$this->fsock];
|
$read = [$this->fsock];
|
||||||
$write = $except = null;
|
$write = $except = null;
|
||||||
$start = microtime(true);
|
$start = microtime(true);
|
||||||
$sec = floor($this->curTimeout);
|
$sec = (int) floor($this->curTimeout);
|
||||||
$usec = 1000000 * ($this->curTimeout - $sec);
|
$usec = (int) 1000000 * ($this->curTimeout - $sec);
|
||||||
if (@stream_select($read, $write, $except, $sec, $usec) === false) {
|
if (@stream_select($read, $write, $except, $sec, $usec) === false) {
|
||||||
throw new \RuntimeException('Connection timed out whilst receiving server identification string');
|
throw new \RuntimeException('Connection timed out whilst receiving server identification string');
|
||||||
}
|
}
|
||||||
@ -3330,8 +3330,8 @@ class SSH2
|
|||||||
$this->curTimeout-= $elapsed;
|
$this->curTimeout-= $elapsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sec = floor($this->curTimeout);
|
$sec = (int)floor($this->curTimeout);
|
||||||
$usec = 1000000 * ($this->curTimeout - $sec);
|
$usec = (int)(1000000 * ($this->curTimeout - $sec));
|
||||||
|
|
||||||
// this can return a "stream_select(): unable to select [4]: Interrupted system call" error
|
// this can return a "stream_select(): unable to select [4]: Interrupted system call" error
|
||||||
if (!@stream_select($read, $write, $except, $sec, $usec)) {
|
if (!@stream_select($read, $write, $except, $sec, $usec)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user