diff options
author | Guillaume Mazoyer <respawneral@gmail.com> | 2014-08-03 16:08:59 +0200 |
---|---|---|
committer | Guillaume Mazoyer <respawneral@gmail.com> | 2014-08-03 16:08:59 +0200 |
commit | f4f072501cf43f73d84081cf3035a0d45c88c367 (patch) | |
tree | cacaf9e4368adcee92253db7b11caefbe0f697e9 /auth/ssh.php | |
parent | 9d7bd8aaec4309f303bdc284aa7247b09a34a977 (diff) |
Fix send command if reconnection is needed when using SSH.
Diffstat (limited to 'auth/ssh.php')
-rw-r--r-- | auth/ssh.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/auth/ssh.php b/auth/ssh.php index 68fd927..b2f96de 100644 --- a/auth/ssh.php +++ b/auth/ssh.php @@ -71,7 +71,7 @@ final class SSH extends Authentication { } public function send_command($command) { - if ($this->connection == null) { + if (($this->connection == null) || !$this->connection->isConnected()) { $this->connect(); } @@ -81,7 +81,7 @@ final class SSH extends Authentication { } public function disconnect() { - $this->send_command('exit'); + $this->connection->disconnect(); $this->connection = null; } } |