powered by Jive Software

MultiUserChat.join with leaveSync()

Hello again,
after this discussion:

we’ve got the fix with leaveSync() in join(). However this now presents another problem. If connection is interrupted (I simulate it by shutting and starting local XMPP server) then joined is still true in this if:

public synchronized void join(MucEnterConfiguration mucEnterConfiguration)
...
if (joined) {
            try {
                leaveSync();
            }

and leaveSync() sends unavailable stanza and waits for response until timeout (30 sec in my case). If you have many MUCs you could wait a very long time before you join all of them.

Not sure how to fix it :frowning:

Thanks
Kvad

The solution of this probably involves XEP-0410: MUC Self-Ping (Schrödinger’s Chat) to update the ‘joined’ boolean prior joining a MUC again.

Please not that this is potentially also caused by the MUC service implementation not kicking participants if the MUC service shuts down.

Thank you Flow. I’ve crated a workaround where I loop through my chats and call leave() on each of them that has isJoined == true. Then later joining goes without delay. Works for now.

This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.