Close connection
509676
public function closeConnection () {
        if ( $this->transport->getSmtp()->isConnect()) {
            $this->transport->getSmtp()->rset();
            $this->transport->getSmtp()->disconnect();
        }
    }
648712
def close(self):
        """"""
        try:
            if self.connection is None:
                return
            while self.nextset():
                pass
        finally:
            self.connection = None
            self._result = None
1344213
def close_socket(self):
        ''''''
        log.debug("Closing socket")
        if self.sock:
            try:
                self.sock.close()
            except:
                pass

            self.sock = None
527538
def close(self):
    """"""
    try:
      self._conn.send((self._CLOSE, None))
      self._conn.close()
    except IOError:
      # The connection was already closed.
      pass
    self._process.join()
69866
def close(self):
        """"""
        uwsgi.disconnect()
        if self._req_ctx is None:
            # better kill it here in case wait() is not called again
            self._select_greenlet.kill()
            self._event.set()
48827
async def close(self):
        """"""
        if not self._conn:
            return
        c = await self._execute(self._conn.close)
        self._conn = None
        return c
198998
def close_socket(self):
        """"""
        if _debug: UDPDirector._debug("close_socket")

        self.socket.close()
        self.close()
        self.socket = None
155868
def close_connection (self):
        
        if self.url_connection is None:
            # no connection is open
            return
        try:
            self.url_connection.close()
        except Exception:
            # ignore close errors
            pass
        self.url_connection = None
347878
def close(self):
        """"""
        if self.sock:
            self.sock.close()
        self.sock = 0
        self.eof = 1
884368
def close(self, wait=True, abort=False):
        """"""
        if not self.closed and not self.closing:
            self.closing = True
            self.server._trigger_event('disconnect', self.sid, run_async=False)
            if not abort:
                self.send(packet.Packet(packet.CLOSE))
            self.closed = True
            self.queue.put(None)
            if wait:
                self.queue.join()
1253209
def close_connection(self):  # pylint: disable=C0103
        
        if self.port:
            self.stop()
            self.logger.debug("Close port '%s'" % self.comport,
                              extra={'type': '<->'})
            self.port.close()
            self.port = False
716016
def close(self):
        """"""
        try:
            if self._connection:
                backend = self.create_backend()
                backend.close_connection(self._connection)
        except socket.error:
            pass
        self._closed = True
1061702
def closeConnection(self):
        """"""
        print '%s call closeConnection' % self.port
        try:
            if self.handle:
                self.handle.close()
                self.handle = None
        except Exception, e:
            ModuleHelper.WriteIntoDebugLogger("closeConnection() Error: " + str(e))
134273
def close_connection(self, connection_id):
        
        request = requests_pb2.CloseConnectionRequest()
        request.connection_id = connection_id
        self._apply(request)
732089
function closeConnection(options) {
  //no options, close/delete all connection references
  if (!options) {
    try {
      mssql.close();
    } catch(err){}

    //create list to track items to close
    let closeList = [];

    //iterate through each connection
    for (let key in promises) {
      //if there's a close method (connection match), add it to the list
      if (promises[key] && typeof promises[key].close === 'function') closeList.push(promises[key]);
    }

    //iterate through list and close each connection
    closeList.forEach((item)=>item.close());
  }

  //either a connection promise, or a connection
  if (options._mssqlngKey && typeof options.close === 'function') return options.close();

  //match against connection options
  let key = stringify(options || {});
  if (connections[key]) connections[key].close();
  if (promises[key]) promises[key].then((conn)=>conn.close()).catch(()=>{ delete promises[key]; delete connections[key] });
}
788596
def remove(self, connection):
        ''''''
        key = (connection.host, connection.port)
        with self._lock:
            found = self._connections.pop(key, None)
        try:
            self.close_connection(found)
        except Exception as exc:
            logger.warn('Failed to close %s: %s', connection, exc)
        return found
993882
def Close(self):
		
		if self.connection is not None:
			try:
				self.connection.commit()
				self.connection.close()
				self.connection = None
			except Exception, e:
				pass