summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Mazoyer <respawneral@gmail.com>2014-08-03 16:10:44 +0200
committerGuillaume Mazoyer <respawneral@gmail.com>2014-08-03 16:10:44 +0200
commitb26e4808e59cd499ead2c42f74bf94ca8f434718 (patch)
treee406a191b32e8d627c0166aea67a93dd17002591
parentf4f072501cf43f73d84081cf3035a0d45c88c367 (diff)
Fix SSH disconnect function.
-rw-r--r--auth/ssh.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/auth/ssh.php b/auth/ssh.php
index b2f96de..a8a74b9 100644
--- a/auth/ssh.php
+++ b/auth/ssh.php
@@ -81,8 +81,10 @@ final class SSH extends Authentication {
}
public function disconnect() {
- $this->connection->disconnect();
- $this->connection = null;
+ if ($this->connection != null) {
+ $this->connection->disconnect();
+ $this->connection = null;
+ }
}
}