[ejabberd] Late unavailable presence can knock a newer session out of a chatroom

Kevin Crosbie kcrosbie at ravenpack.com
Thu Nov 13 12:54:20 MSK 2008

Kevin Crosbie wrote:
> This doesn't seem right to me... I guess it could be solved as you said,
> by making ejabberd aware of the rooms a session was in.   The other way
> is to make the protocol for replacing a session be:
> 1. New session authenticates.
> 2. Any cleanup on the old session is done.   Unavailable presence is
> sent to any rooms for the old session.
> 3. Old session is terminated gracefully.
> 4. Possibly in parallel to step 3 or before step 3 returns, return
> success to the new session.
> Kevin

I case anybody is interested in this issue, I posted a followup to

"To accomplish my goal of not having my subsequent session kicked out, I
used a combination of unique resources and unique room nicknames. When
the first session is replaced, the second session is not affected.
If you are trying to maintain 1 session per username, then it is also
vital to set max_user_sessions to 1."


More information about the ejabberd mailing list