public void setDetached() {
        lock.lock();
        try {
            Log.debug("Setting session with address {} and streamID {} in detached mode.", this.address, this.streamID );
            this.sessionManager.addDetached(this);
            this.conn = null;
        }finally {
            lock.unlock();
        }
    }
Set the session to detached mode, indicating that the underlying connection
has been closed.
xmppserver/src/main/java/org/jivesoftware/openfire/session/LocalSession.java