mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-05 04:57:53 +00:00
SSH2: fixes relating to delayed global requests
This commit is contained in:
parent
fd33675e48
commit
9b49d3c590
@ -1159,11 +1159,12 @@ class Net_SSH2
|
||||
}
|
||||
$elapsed = strtok(microtime(), ' ') + strtok('') - $start;
|
||||
|
||||
$this->curTimeout-= $elapsed;
|
||||
|
||||
if ($this->curTimeout <= 0) {
|
||||
$this->is_timeout = true;
|
||||
return false;
|
||||
if ($this->curTimeout) {
|
||||
$this->curTimeout-= $elapsed;
|
||||
if ($this->curTimeout < 0) {
|
||||
$this->is_timeout = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3695,10 +3696,6 @@ class Net_SSH2
|
||||
if ($client_channel == -1 && $response === true) {
|
||||
return true;
|
||||
}
|
||||
if (!strlen($response)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (!strlen($response)) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user