Called by the connection manager to let us know when a connection has been closed.
13890
public synchronized void connectionClosed (Connection conn)
    {
        // remove the session from the connection map
        PresentsSession session = _conmap.remove(conn);
        if (session != null) {
            log.debug("Unmapped session", "session", session, "conn", conn);
            // let the session know the connection went away
            session.wasUnmapped();

        } else {
            log.debug("Closed unmapped connection '" + conn + "'. " +
                    "Session probably not yet authenticated.");
        }
    }
1059342
def _on_close(self, socket):
        
        self.logger.debug('Connection closed.')

        for subscription in self.subscriptions.values():
            if subscription.state == 'subscribed':
                subscription.state = 'connection_pending'
1147631
public void fireConnectionClosed() {
    ConnectionEvent event = new ConnectionEvent(this);
    for (ConnectionEventListener listener : connectionEventListeners) {
      listener.connectionClosed(event);
    }
  }
70504
@Handler(channels = NetworkChannel.class)
    public void onClosed(Closed event, TcpChannel netConnChannel) {
        netConnChannel.associated(WebAppMsgChannel.class).ifPresent(
            appChannel -> appChannel.handleClosed(event));
        pooled.remove(netConnChannel.remoteAddress(), netConnChannel);
    }
1131904
def connection_lost(self, exc):
        
        _LOGGER.error("Disconnected: %s", exc)
        self.connected = False
        self.transport.close()
        if self._report_task is not None:
            self._report_task.cancel()
        self._msg_task.cancel()
        for q in [self._cmdq, self._updateq, self._msgq]:
            while not q.empty():
                q.get_nowait()
        self.status = {}
332694
private void checkClosed() throws SIIncorrectCallException
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "checkClosed", ""+closed);
      if (closed) 
         throw new SIIncorrectCallException(
            TraceNLS.getFormattedMessage(CommsConstants.MSG_BUNDLE, "PROXY_QUEUE_CONVERSATION_GROUP_CLOSED_SICO1059", null, "PROXY_QUEUE_CONVERSATION_GROUP_CLOSED_SICO1059") // D270373
         );
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "checkClosed");
   }
562445
def close(self):
        
        with self.lock:
            if self.is_closed:
                return
            self.is_closed = True

        log.debug("Closing connection (%s) to %s", id(self), self.endpoint)
        reactor.callFromThread(self.connector.disconnect)
        log.debug("Closed socket to %s", self.endpoint)

        if not self.is_defunct:
            self.error_all_requests(
                ConnectionShutdown("Connection to %s was closed" % self.endpoint))
            # don't leave in-progress operations hanging
            self.connected_event.set()
1293533
def on_close(self):
        ''' 

        '''
        log.info('WebSocket connection closed: code=%s, reason=%r', self.close_code, self.close_reason)
        if self.connection is not None:
            self.application.client_lost(self.connection)
1306202
private static synchronized void closeRegisteredConnections() {
        for (Connection connection : activeConnections) {
            LOGGER.log(Level.INFO, "Forcing connection to {0}:{1} closed.",
                    new Object[]{connection.getHostname(), connection.getPort()});
            // force closed just in case
            connection.close();
        }
        activeConnections.clear();
    }
414330
def connectionLost(self, reason):
        
        if self._disconnectCBs:
            for cb in self._disconnectCBs:
                cb(self, reason)
928393
def connection_lost(self, exc):
        """"""
        _LOGGER.debug('Connection lost with %s', self.transport)
        if self.gateway.cancel_check_conn:
            self.gateway.cancel_check_conn()
            self.gateway.cancel_check_conn = None
        if exc:
            _LOGGER.error(exc)
            self.conn_lost_callback()
        self.transport = None
1354434
def _on_closed(self):
        """"""
        self._connected.clear()
        if not self._closing:
            if self._on_close_callback:
                self._on_close_callback()
            else:
                raise exceptions.ConnectionError('closed')
800599
function (error, order, recvMsg) {
      if (error) {
        me_order.client.MsgEndDialog(function (error2, recvMsg2) {
          if (error2) {
            me_order.client.log.con.error({
              error: error2
            }, 'Connection close failed after error.')
          } else {
            me_order.client.log.con.debug('Connection closed okay, after error.')
          }
        })
      }
      cb(error, order, recvMsg)
    }
329710
protected void onOutboundComplete() {
		if (log.isDebugEnabled()) {
			log.debug(format(channel(), "[{}] User Handler requesting close connection"), formatName());
		}
		markPersistent(false);
		terminate();
	}
1214391
def handleConnectionState(self, msg):
        """"""
        self.connected = not (msg.typeName == "error" and
                              msg.errorCode in dataTypes["DISCONNECT_ERROR_CODES"])

        if self.connected:
            self.connection_tracking["errors"] = []
            self.connection_tracking["disconnected"] = False

            if msg.typeName == dataTypes["MSG_CURRENT_TIME"] and not self.connection_tracking["connected"]:
                self.log.info("[CONNECTION TO IB ESTABLISHED]")
                self.connection_tracking["connected"] = True
                self.ibCallback(caller="handleConnectionOpened", msg="<connectionOpened>")
        else:
            self.connection_tracking["connected"] = False

            if not self.connection_tracking["disconnected"]:
                self.connection_tracking["disconnected"] = True
                self.log.info("[CONNECTION TO IB LOST]")
1327691
def connection_lost(self, exc):
        """"""
        if exc is None:
            self.log.warning('eof from receiver?')
        else:
            self.log.warning('Lost connection to receiver: %s', exc)

        self.transport = None

        if self._connection_lost_callback:
            self._loop.call_soon(self._connection_lost_callback)
1316168
protected function closeDoctrineConnections()
    {
        foreach (app('db')->getConnections() as $connection) {
            call_user_func(\Closure::bind(function () {
                $this->doctrineConnection = null;
            }, $connection, $connection));
        }
    }