Closes the active SMTP session if one exists.
@return void
543840
public function SmtpClose() {
    if ($this->smtp !== null) {
      if($this->smtp->Connected()) {
        $this->smtp->Quit();
        $this->smtp->Close();
      }
    }
  }
673967
public function close_connection()
    {
        $this->last_error = null;
        $this->last_error_id = null;
        $this->last_query = null;
        $this->row = null;
        $this->field_names = null;
        
        if (!$this->connection) {
            return true;
        }
        
        if (is_resource($this->connection)) {
            @sqlsrv_close($this->connection);
        }
        
        $this->connection = null;
        $this->query_parameters = null;
        $this->statement = null;
        $this->last_error = null;
        $this->last_error_id = null;
        
        return true;
    }
823113
protected final void closeSession() {
        if (sessionTracker != null) {
            Session currentSession = sessionTracker.getOpenSession();
            if (currentSession != null) {
                currentSession.close();
            }
        }
    }
421644
protected function safeClose()
    {
        try {
            if (isset($this->input) && $this->input) {
                $this->close();
            }
        } catch (\Exception $e) {
            // Nothing here
        }
    }
984193
public function closeConnection()
    {
        if ($this->logged && $this->putLine($this->nextTag() . ' LOGOUT')) {
            $this->readReply();
        }

        $this->closeSocket();
    }
1227171
public static function terminate() {
		if (! self::isStarted ())
			return;
		self::start ();
		$_SESSION = array ();

		if (\ini_get ( "session.use_cookies" )) {
			$params = \session_get_cookie_params ();
			\setcookie ( \session_name (), '', \time () - 42000, $params ["path"], $params ["domain"], $params ["secure"], $params ["httponly"] );
		}
		\session_destroy ();
	}
737147
protected function ldap_close() {
        if (isset($this->ldapconnection)) {
            @ldap_close($this->ldapconnection);
            $this->ldapconnection = null;
        }
        return;
    }
282233
function close() {
        $this->_error_log('closing socket ' . $this->sock);
        $this->_connection_closed = true;
        fclose($this->sock);
    }
513188
public function Close()
    {
        $this->error     = null; // so there is no confusion
        $this->helo_rply = null;
        if (!empty($this->smtp_conn)) {
            // close the connection and cleanup
            fclose($this->smtp_conn);
            $this->smtp_conn = 0;
        }
    }
1306305
public function closeSession()
    {
        if (isset(\Yii::$app) && \Yii::$app->has('session', true)) {
            \Yii::$app->session->close();
        }
    }
259472
public function quit()
    {
        // although RFC says QUIT can be issued at any time, we won't
        if ($this->state['helo']) {
            try {
                $this->send('QUIT');
                $this->expect($this->config['responseCodes']['SMTP_QUIT_SUCCESS'], $this->config['commandTimeouts']['quit']);
            } catch (Exception\ExceptionUnexpectedResponse $e) {}
        }
    }
378112
public function close()
    {
        $id = session_id();
        // Make sure the session is unlocked and the expiration time is updated,
        // even if the write did not occur
        if ($this->openSessionId !== $id || !$this->sessionWritten) {
            $result = $this->connection->write($this->formatId($id), '', false);
            $this->sessionWritten = (bool) $result;
        }

        return $this->sessionWritten;
    }
1019880
public function close()
    {
        if (is_resource($this->socket)) {
            Debug::Log(Debug::DEBUG, 'socket_close()');
            return fclose($this->socket);
        }

        return true;
    }
520232
public static function write_close() {

        if ( self::$sessionState === self::SESSION_STARTED ) {
            self::$sessionState = self::SESSION_NOT_STARTED;

            return session_write_close();
        }

        return true;
    }
1157086
private void closeSession(){
        if(LOGGER.isDebugEnabled()){
            LOGGER.debug("Close the session, sessionId=" + session.id + ", timeOut=" + session.timeOut);
        }
        if(! closing && getStatus().isConnected()){
            closing = true;
            if(getStatus().isAlive()){
                setStatus(ConnectionStatus.NOT_CONNECTED);
            }
            cleanupSession();
            closing = false;
        }
    }
337051
public function dispose() {
        parent::dispose(); // Call parent dispose to write/close session and other common stuff before closing connection

        if ($this->sqlsrv) {
            sqlsrv_close($this->sqlsrv);
            $this->sqlsrv = null;
        }
    }
206518
private function close()
    {
        if (is_resource($this->resource)) {
            pg_close($this->resource);
            $this->resource = null;
        }
    }