mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-06-03 09:00:52 +00:00
SSH2: set stream timeout before calling stream_get_contents
This commit is contained in:
parent
498e67a0c8
commit
2fb6f317d6
|
@ -3646,6 +3646,9 @@ class SSH2
|
||||||
}
|
}
|
||||||
|
|
||||||
$start = microtime(true);
|
$start = microtime(true);
|
||||||
|
$sec = (int) floor($this->curTimeout);
|
||||||
|
$usec = (int) (1000000 * ($this->curTimeout - $sec));
|
||||||
|
stream_set_timeout($this->fsock, $sec, $usec);
|
||||||
$raw = stream_get_contents($this->fsock, $this->decrypt_block_size);
|
$raw = stream_get_contents($this->fsock, $this->decrypt_block_size);
|
||||||
|
|
||||||
if (!strlen($raw)) {
|
if (!strlen($raw)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user