mirror of
https://github.com/danog/phpseclib.git
synced 2024-11-27 04:46:26 +01:00
SSH2: timeout set in constructor != timeout set by setTimeout()
This commit is contained in:
parent
fc748346fc
commit
f27a49299e
@ -801,6 +801,17 @@ class Net_SSH2
|
||||
*/
|
||||
var $port;
|
||||
|
||||
/**
|
||||
* Timeout for Constructor
|
||||
*
|
||||
* For historical BC purposes setTimeout() does not effect timeout of constructor
|
||||
*
|
||||
* @see Net_SSH2::login()
|
||||
* @var Integer
|
||||
* @access private
|
||||
*/
|
||||
var $constructorTimeout
|
||||
|
||||
/**
|
||||
* Default Constructor.
|
||||
*
|
||||
@ -899,7 +910,7 @@ class Net_SSH2
|
||||
|
||||
$this->host = $host;
|
||||
$this->port = $port;
|
||||
$this->timeout = $timeout;
|
||||
$this->constructorTimeout = $timeout;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -910,7 +921,7 @@ class Net_SSH2
|
||||
*/
|
||||
function _connect()
|
||||
{
|
||||
$timeout = $this->timeout;
|
||||
$timeout = $this->constructorTimeout;
|
||||
|
||||
$this->last_packet = strtok(microtime(), ' ') + strtok(''); // == microtime(true) in PHP5
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user