Steam Management should not close reconnected session


Stream Management is a feature described in XEP-0198:

Stream Management allows for an XMPP session to be resumed after its connection has been (unexpectedly) dropped. To be able to do this, the XMPP session is kept alive for a certain time after the disconnect. If, after this period, the session has not been resumed, its closed (sending 'unavailable' presences to all of the contacts, etc).

There's a bug in Openfire that causes this disconnect to occur on a new XMPP session that has been established after the original session was closed, if that session is established using the exact same full JID.

Openfire apparently:

  • sets a 'detached' state for XMPP sessions, even if the session was closed properly.

  • identifies sessions to be cleaned up after a detach TTL by JID, not by a more unique identifier.

  • does not purge the 'detached' sessions when a new session using the same full JID binds successfully.

Update: it appears that when the first session closes formally/properly (eg: with </stream:stream>, the problem described in this issue is not reproducible.




Guus der Kinderen


Guus der Kinderen