powered by Jive Software

What is detached status in session list

Hello Dev team,

I have upgraded the Openfire server version to 4.5.1. I have noticed that in session list i can see Detached status i am not sure what is that can any one explain this ?


Hiren vavadiya

Hi Hiren,

This is a feature that relates to XEP-0198: Stream Management: it allows a session that is interrupted to be resumed. This is useful in scenarios where network is unreliable (for example, with mobile phones), to prevent the client to have to re-initialize a new session upon reconnect.

The state detached means that Openfire detected that a client connection is lost (without having been properly closed). Openfire will wait for the client to re-establish the connection. If that does not happen within a few minutes, the session will be marked as closed.


Thanks @guus for the clarifications.

@guus Is there any reason that the user presence keeps getting online in Detached mode? Should not it be offline?

The state ‘detached’ represents a scenario where the client unexpectedly lost its connection, and is expected to be back soon. Openfire keeps the session ‘alive’ until that time (or until a timeout occurs).

While Openfire keeping the session ‘alive’, it should show user presence offline or away.

Think the scenario:
Client see the user online and send messages and those messages will not deliver to the user until the user session resumed. This confuses the client sending messages.

Moreover, when you request last activity of the user, it will return 0 means that user is online.

I think, user presence should not be online in detached mode.

Please read the specification. The user is considered online while the session is detached.