diff options
author | Guillaume Mazoyer <respawneral@gmail.com> | 2014-08-03 16:10:44 +0200 |
---|---|---|
committer | Guillaume Mazoyer <respawneral@gmail.com> | 2014-08-03 16:10:44 +0200 |
commit | b26e4808e59cd499ead2c42f74bf94ca8f434718 (patch) | |
tree | e406a191b32e8d627c0166aea67a93dd17002591 | |
parent | f4f072501cf43f73d84081cf3035a0d45c88c367 (diff) |
Fix SSH disconnect function.
-rw-r--r-- | auth/ssh.php | 6 |
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; + } } } |