mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 03:27:31 +00:00
SSH2: rm redundant code and make php4 compatable
This commit is contained in:
parent
23c65c3839
commit
dfd57dfb89
@ -991,8 +991,6 @@ class Net_SSH2
|
|||||||
$temp = '';
|
$temp = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$read = array($this->fsock);
|
|
||||||
|
|
||||||
if ($this->curTimeout) {
|
if ($this->curTimeout) {
|
||||||
if ($this->curTimeout < 0) {
|
if ($this->curTimeout < 0) {
|
||||||
$this->is_timeout = true;
|
$this->is_timeout = true;
|
||||||
@ -1000,7 +998,7 @@ class Net_SSH2
|
|||||||
}
|
}
|
||||||
$read = array($this->fsock);
|
$read = array($this->fsock);
|
||||||
$write = $except = null;
|
$write = $except = null;
|
||||||
$start = microtime(true);
|
$start = strtok(microtime(), ' ') + strtok('');
|
||||||
$sec = floor($this->curTimeout);
|
$sec = floor($this->curTimeout);
|
||||||
$usec = 1000000 * ($this->curTimeout - $sec);
|
$usec = 1000000 * ($this->curTimeout - $sec);
|
||||||
// on windows this returns a "Warning: Invalid CRT parameters detected" error
|
// on windows this returns a "Warning: Invalid CRT parameters detected" error
|
||||||
@ -1009,7 +1007,7 @@ class Net_SSH2
|
|||||||
$this->is_timeout = true;
|
$this->is_timeout = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$elapsed = microtime(true) - $start;
|
$elapsed = strtok(microtime(), ' ') + strtok('') - $start;
|
||||||
$this->curTimeout-= $elapsed;
|
$this->curTimeout-= $elapsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user