diff options
-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; + } } } |