Removes a send_message function previously registered
        with the Dispatcher.

        Args:
            connection (str): A locally unique identifier provided
                by the receiver of messages.
338019
def remove_send_message(self, connection):
        
        if connection in self._send_message:
            del self._send_message[connection]
            LOGGER.debug("Removed send_message function "
                         "for connection %s", connection)
        else:
            LOGGER.warning("Attempted to remove send_message "
                           "function for connection %s, but no "
                           "send_message function was registered",
                           connection)
768078
def disconnect(self, connection):
        
        self.log.debug("Disconnecting %s" % connection)
        if connection in self._pending:
            pending_frame = self._pending[connection]
            self.store.requeue(pending_frame.headers.get(
                'destination'), pending_frame)
            del self._pending[connection]

        for dest in list(self._queues.keys()):
            if connection in self._queues[dest]:
                self._queues[dest].remove(connection)
            if not self._queues[dest]:
                # This won't trigger RuntimeError, since we're using keys()
                del self._queues[dest]
429116
def delete(connection)
      xml = %(<EnginePoolDeleteRequest session-id="#{connection.session_id}">)
      xml << %(<EnginePool name="#{@name}" scope="#{@scope}" />)
      xml << '</EnginePoolDeleteRequest>'

      r = connection.execute(xml, '1.2')
      r.success
    end
223189
public void removeConsumerSetMonitors(ConnectionImpl connection)
  throws SINotPossibleInCurrentConfigurationException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "removeConsumerSetMonitors", new Object[] { connection });

    // Renmove under a lock on the targets table
    synchronized(_targets)
    {
      _consumerMonitoring.removeConsumerSetMonitors(connection);
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "removeConsumerSetMonitors");
  }
737904
def disconnect(self, connection):
        
        self.log.debug("Disconnecting %s" % connection)
        for dest in list(self._topics.keys()):
            if connection in self._topics[dest]:
                self._topics[dest].remove(connection)
            if not self._topics[dest]:
                # This won't trigger RuntimeError, since we're using keys()
                del self._topics[dest]
662255
public void removeConsumerSetMonitors(ConnectionImpl connection)
  throws SINotPossibleInCurrentConfigurationException       
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "removeConsumerSetMonitors", new Object[] { connection });

    // Call the registrar
    _consumerMonitorRegistrar.removeConsumerSetMonitors(connection);

    if (tc.isEntryEnabled())
      SibTr.exit(tc, "removeConsumerSetMonitors");
  }
589238
def inplace_delete_message(
        message_queue: List[SendMessageEvent],
        state_change: Union[ReceiveDelivered, ReceiveProcessed],
) -> None:
    
    for message in list(message_queue):
        message_found = (
            message.message_identifier == state_change.message_identifier and
            message.recipient == state_change.sender
        )
        if message_found:
            message_queue.remove(message)
458181
function (connection) {
        delete Transaction.connections[connection.transactionId];
        connection.transactionId = null;
        connection.transactionConfig = null;
    }
221473
ServerSessionManager unregisterConnection(Connection connection) {
    Iterator<Map.Entry<String, Connection>> iterator = connections.entrySet().iterator();
    while (iterator.hasNext()) {
      Map.Entry<String, Connection> entry = iterator.next();
      if (entry.getValue().equals(connection)) {
        ServerSessionContext session = clients.get(entry.getKey());
        if (session != null) {
          session.setConnection(null);
        }
        iterator.remove();
      }
    }
    return this;
  }
1167031
private void removeConnectionCallbacks() {
        connection.removeSyncStanzaListener(messageListener);
        if (messageCollector != null) {
            messageCollector.cancel();
            messageCollector = null;
        }
    }
234687
def connectionLost(self, reason):
        
        self.factory.protocols.remove(self)
        super(AMP, self).connectionLost(reason)
33462
def remove_all_connections(provider_id):
    
    provider = get_provider_or_404(provider_id)

    ctx = dict(provider=provider.name, user=current_user)

    deleted = _datastore.delete_connections(user_id=current_user.get_id(),
                                            provider_id=provider_id)
    if deleted:
        after_this_request(_commit)
        msg = ('All connections to %s removed' % provider.name, 'info')
        connection_removed.send(current_app._get_current_object(),
                                user=current_user._get_current_object(),
                                provider_id=provider_id)
    else:
        msg = ('Unable to remove connection to %(provider)s' % ctx, 'error')

    do_flash(*msg)
    return redirect(request.referrer)
977473
def disconnect(self, message=""):
        
        try:
            del self.connected
        except AttributeError:
            return

        try:
            self.socket.shutdown(socket.SHUT_WR)
            self.socket.close()
        except socket.error:
            pass
        del self.socket
        self.reactor._handle_event(
            self,
            Event("dcc_disconnect", self.peeraddress, "", [message]))
        self.reactor._remove_connection(self)
1267276
def removeCallback(cls, eventType, func, record=None):
        
        callbacks = cls.callbacks()
        callbacks.setdefault(eventType, [])
        for i in xrange(len(callbacks[eventType])):
            my_func, my_record, _ = callbacks[eventType][i]
            if func == my_func and record == my_record:
                del callbacks[eventType][i]
                break
582378
def remove_connection(self, interface1, interface2):
        """"""

        uri = "api/interface/disconnect/%s/%s/" % (interface1, interface2)

        return self.delete(uri)
646677
public void removeConnection(WebSocketConnection conn) {
        conns.remove(conn);
        for (IWebSocketDataListener listener : listeners) {
            listener.onWSDisconnect(conn);
        }
    }
1050570
public void signOff(WebSocketConnection connection) {
        for (ConcurrentMap<WebSocketConnection, WebSocketConnection> connections : registry.values()) {
            connections.remove(connection);
        }
    }