From b26e4808e59cd499ead2c42f74bf94ca8f434718 Mon Sep 17 00:00:00 2001 From: Guillaume Mazoyer Date: Sun, 3 Aug 2014 16:10:44 +0200 Subject: Fix SSH disconnect function. --- auth/ssh.php | 6 ++++-- 1 file 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; + } } } -- cgit v1.2.3