@Override public Response processRemoveConnection(ConnectionId id, long lastDeliveredSequenceId) throws Exception { // Don't allow things to be added to the connection state while we // are shutting down. state.shutdown(); // Cascade the connection stop to the sessions. for (SessionId sessionId : state.getSessionIds()) { try { processRemoveSession(sessionId, lastDeliveredSequenceId); } catch (Throwable e) { // LOG } } try { protocolManager.removeConnection(context, state.getInfo(), null); } catch (Throwable e) { // log } return null; }