function disconnect()
 {
     // if disconnect function is available call it..
     if (function_exists('ssh2_disconnect')) {
         ssh2_disconnect($this->conn);
     } else {
         // if no disconnect func is available, close conn, unset var
         @fclose($this->conn);
         unset($this->conn);
     }
     // return null always
     return NULL;
 }
Example #2
0
 public function disconnect()
 {
     $this->logAction("Disconnecting from {$this->host}");
     // if disconnect function is available call it..
     if (function_exists('ssh2_disconnect')) {
         ssh2_disconnect($this->conn);
     } else {
         // if no disconnect func is available, close conn, unset var
         @fclose($this->conn);
         $this->conn = false;
     }
     // return null always
     return NULL;
 }
Example #3
0
 /**
  * disconnect from SSH2 server
  */
 public function disconnect()
 {
     if (function_exists('ssh2_disconnect')) {
         ssh2_disconnect($this->connection);
     } else {
         @fclose($this->connection);
         unset($this->connection);
     }
 }