Correct way to dispose of a running conference?



I have a native app (Android / IOS) and am using XMPP to manage the conference MUC (jicofo / jvb).

I am trying to work out the correct way for an owner to tear down a running conference. When the conference is torn down by virtue of all users just leaving the room that seeems to work fine.

But when I want the owner to forcibly terminate the call it seems like I’m “leaking” a conference on the jicofo side.

What I’m doing to accomplish is having a owner destroy the MUC in the standard XMPP way:

The reason I think a conference is being “leaked” is that the logging subsequent conferences will increment the conference count “Conference count 2” … “Conference count 3” …)

am I missing a required step here or should I expect this to work?




I’ve been debugging this and it looks to me like there is some commented out code to simulate other occupants leaving the MUC which is necessary for the occupant count to drop to the level needed for the conference to get cleaned up:

when I add the simulated “memberListener.left” calls back in again the room destroy code path now seems to work as expected (see diff below).

I’ll submit a PR but would be interested on any feedback on anything I could be missing here.


diff --git a/src/main/java/org/jitsi/impl/protocol/xmpp/ b/src/main/java/org/jitsi/impl/protocol/xmpp/
index edf2008..e5d7de8 100644
--- a/src/main/java/org/jitsi/impl/protocol/xmpp/
+++ b/src/main/java/org/jitsi/impl/protocol/xmpp/
@@ -339,17 +339,18 @@ public void leave()

         // Simulate member left events
         // No need to do this - we dispose whole conference anyway on stop
-        /*HashMap<String, ChatMemberImpl> membersCopy;
+        HashMap<EntityFullJid, ChatMemberImpl> membersCopy;
         synchronized (members)
-                = new HashMap<String, ChatMemberImpl>(members);
+                = new HashMap<EntityFullJid, ChatMemberImpl>(members);

-        for (ChatMemberImpl member : membersCopy.values())
+        for (EntityFullJid member : membersCopy.keySet())
-            memberListener.left(member.getContactAddress());
-        }*/
+  "Simulating leaving for: " + member);
+            memberListener.left(member);
+        }

         FIXME: we do not care about local user left for now