mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-16 02:07:09 +00: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;
|
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.
|
* Default Constructor.
|
||||||
*
|
*
|
||||||
@ -899,7 +910,7 @@ class Net_SSH2
|
|||||||
|
|
||||||
$this->host = $host;
|
$this->host = $host;
|
||||||
$this->port = $port;
|
$this->port = $port;
|
||||||
$this->timeout = $timeout;
|
$this->constructorTimeout = $timeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -910,7 +921,7 @@ class Net_SSH2
|
|||||||
*/
|
*/
|
||||||
function _connect()
|
function _connect()
|
||||||
{
|
{
|
||||||
$timeout = $this->timeout;
|
$timeout = $this->constructorTimeout;
|
||||||
|
|
||||||
$this->last_packet = strtok(microtime(), ' ') + strtok(''); // == microtime(true) in PHP5
|
$this->last_packet = strtok(microtime(), ' ') + strtok(''); // == microtime(true) in PHP5
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user