1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-11-30 04:39:21 +01:00

SSH2: fixes relating to delayed global requests

This commit is contained in:
terrafrost 2018-05-19 06:26:22 -05:00
parent fd33675e48
commit 9b49d3c590

View File

@ -1159,13 +1159,14 @@ class Net_SSH2
} }
$elapsed = strtok(microtime(), ' ') + strtok('') - $start; $elapsed = strtok(microtime(), ' ') + strtok('') - $start;
if ($this->curTimeout) {
$this->curTimeout-= $elapsed; $this->curTimeout-= $elapsed;
if ($this->curTimeout < 0) {
if ($this->curTimeout <= 0) {
$this->is_timeout = true; $this->is_timeout = true;
return false; return false;
} }
} }
}
$this->identifier = $this->_generate_identifier(); $this->identifier = $this->_generate_identifier();
@ -3695,10 +3696,6 @@ class Net_SSH2
if ($client_channel == -1 && $response === true) { if ($client_channel == -1 && $response === true) {
return true; return true;
} }
if (!strlen($response)) {
return '';
}
if (!strlen($response)) { if (!strlen($response)) {
return false; return false;
} }