diff --git a/lib/classes/sshtransport/class.FroxlorSshTransport.php b/lib/classes/sshtransport/class.FroxlorSshTransport.php index 6d8c3829..f66cee9c 100644 --- a/lib/classes/sshtransport/class.FroxlorSshTransport.php +++ b/lib/classes/sshtransport/class.FroxlorSshTransport.php @@ -245,7 +245,10 @@ class FroxlorSshTransport public function close() { // close the session and force flushing file content to disk - ssh2_exec($this->_connection, 'exit'); + if (!is_null($this->_connection)) { + ssh2_exec($this->_connection, 'exit'); + } + // set null values $this->_shell = null;