public void addDetached(LocalSession localSession) {
        Log.trace( "Marking session '{}' ({}) as detached.", localSession.getAddress(), localSession.getStreamID() );
        this.detachedSessions.put(localSession.getStreamID(), localSession);
    }
Record a session as being detached (ie, has no connection). This is idempotent.
This should really only be called by the LocalSession itself when it detaches.

@param localSession the LocalSession (this) to mark as detached.
xmppserver/src/main/java/org/jivesoftware/openfire/SessionManager.java