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