Disconnects the given LDAP connection, logging any failure to do so
appropriately.

@param ldapConnection
The LDAP connection to disconnect.
175576
public void disconnect(LDAPConnection ldapConnection) {

        // Attempt disconnect
        try {
            ldapConnection.disconnect();
        }

        // Warn if disconnect unexpectedly fails
        catch (LDAPException e) {
            logger.warn("Unable to disconnect from LDAP server: {}", e.getMessage());
            logger.debug("LDAP disconnect failed.", e);
        }

    }
956610
def disconnect(self):
        """"""
        if self._connected:
            self._connected = False
            self._conn.disconnect()
994459
protected void closeConnection(final String meUuid, boolean alreadyClosed) {

        final String methodName = "closeConnection";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName, new Object [] { meUuid, alreadyClosed });
        }

        final SibRaMessagingEngineConnection connection;
        synchronized (_connections) {

            connection = (SibRaMessagingEngineConnection) _connections
                    .remove(meUuid);

        }

        if (connection != null) {
            connection.close(alreadyClosed);
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName);
        }

    }
740092
public void discardConnection(Connection realConnection) {
        JdbcUtils.close(realConnection);

        lock.lock();
        try {
            activeCount--;
            discardCount++;

            if (activeCount <= 0) {
                emptySignal();
            }
        } finally {
            lock.unlock();
        }
    }
1014008
void closeConnections()
    {
        final String methodName = "closeConnections";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.entry(this, TRACE, methodName);
        }

        synchronized (_connections)
        {
            Collection<SibRaMessagingEngineConnection> cons = _connections.values();
            Iterator<SibRaMessagingEngineConnection> iter = cons.iterator();
            while (iter.hasNext())
            {
                SibRaMessagingEngineConnection connection = iter.next();
                connection.close();
            }
            _connections.clear();
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.exit(TRACE, methodName);
        }
    }
532379
protected void disconnect() {
        disconnect0(connectedAddress.holder().getFamily());
        connected = false;
        connectedAddress = null;
        connectedPort = -1;
    }
1014177
@Disconnect
    public void onDisconnect(AtmosphereResourceEvent event) {
        if (event.isCancelled()) {
            logger.info("Browser {} unexpectedly disconnected", event.getResource().uuid());
        } else if (event.isClosedByClient()) {
            logger.info("Browser {} closed the connection", event.getResource().uuid());
        }
    }
1068597
public void removeConnection (Connection connection) {
		if (connection == null) throw new IllegalArgumentException("connection cannot be null.");

		connection.removeListener(invokeListener);

		synchronized (connectionsLock) {
			ArrayList<Connection> temp = new ArrayList(Arrays.asList(connections));
			temp.remove(connection);
			connections = temp.toArray(new Connection[temp.size()]);
		}

		if (TRACE) trace("kryonet", "Removed connection from ObjectSpace: " + connection);
	}
159180
function Disconnect()
	{
		$this->handler->Log(DBH_LOG_INFO, "Closing Connection...");

		if ($this->dbopen)
		{
			$this->adapter->Close();
			$this->dbopen = false;
			$this->handler->Log(DBH_LOG_INFO, "Connection closed");
		}
		else
		{
			$this->handler->Log(DBH_LOG_WARNING, "Connection Already Closed");
		}
	}
701724
function(connection) {
      var t = this;
      log.info('removeConnection', 'Conn_' + connection.id);
      connection.disconnect('connection_removed');
      t.connections.remove(connection);
      t.trigger('connection:remove', connection);
    }
260474
private void handleDisconnectEvent(DisconnectEvent disconnectEvent)
    {
        // reset version information as it might have changed while Asterisk
        // restarted
        version = null;
        versions = null;

        // same for channels, agents and queues rooms, they are reinitialized
        // when reconnected
        channelManager.disconnected();
        agentManager.disconnected();
        meetMeManager.disconnected();
        queueManager.disconnected();
        initialized = false;
        initializing = false;
    }
1371522
public synchronized void disconnect() {
    if (mConnected) {
      Preconditions.checkNotNull(mChannel, PreconditionMessage.CHANNEL_NULL_WHEN_CONNECTED);
      LOG.debug("Disconnecting from the {} @ {}", getServiceName(), mAddress);
      beforeDisconnect();
      mChannel.shutdown();
      mConnected = false;
      afterDisconnect();
    }
  }
274278
protected void removeConnection(ConnectionImpl connection) {
        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.entry(tc, "removeConnection", connection);

        synchronized (_connections) {
            _connections.remove(connection);
        }

        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.exit(tc, "removeConnection");
    }
1062916
public function disconnect()
    {
        $this->connection = null;

        foreach ($this->getSlaves() as $slave) {
            $slave->disconnect();
        }
    }
1178148
public void disconnectSocket() {
        synchronized (lock) {
            if (socketConnection != null) {
                socketConnection.setManageReconnection(false);
                socketConnection.disconnect();
            }
            lock.notifyAll();
        }
    }
878135
public void delete(String dn) throws LDAPException {
        DeleteRequest deleteRequest = new DeleteRequest(dn);
        delete(deleteRequest);
    }
1085289
void dropRemoteConnections()
    {
        final String methodName = "dropRemoteConnections";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.entry(this, TRACE, methodName);
        }

        if (_connectedRemotely)
        {
            closeConnections();
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.exit(TRACE, methodName);
        }
    }