mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-29 04:23:34 +00:00
Merge branch 'ssh-custom-socket-1.0' into ssh-custom-socket-2.0
Conflicts: phpseclib/Net/SSH2.php
This commit is contained in:
commit
690704d36e
@ -998,14 +998,13 @@ class SSH2
|
|||||||
|
|
||||||
$this->curTimeout = $this->timeout;
|
$this->curTimeout = $this->timeout;
|
||||||
|
|
||||||
$host = $this->host . ':' . $this->port;
|
|
||||||
|
|
||||||
$this->last_packet = microtime(true);
|
$this->last_packet = microtime(true);
|
||||||
|
|
||||||
if (!is_resource($this->fsock)) {
|
if (!is_resource($this->fsock)) {
|
||||||
$start = microtime(true);
|
$start = microtime(true);
|
||||||
$this->fsock = @fsockopen($this->host, $this->port, $errno, $errstr, $this->curTimeout);
|
$this->fsock = @fsockopen($this->host, $this->port, $errno, $errstr, $this->curTimeout);
|
||||||
if (!$this->fsock) {
|
if (!$this->fsock) {
|
||||||
|
$host = $this->host . ':' . $this->port;
|
||||||
user_error(rtrim("Cannot connect to $host. Error $errno. $errstr"));
|
user_error(rtrim("Cannot connect to $host. Error $errno. $errstr"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user