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/ChatRoomImpl.java b/src/main/java/org/jitsi/impl/protocol/xmpp/ChatRoomImpl.java
index edf2008..e5d7de8 100644
@@ -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;
- = new HashMap<String, ChatMemberImpl>(members);
+ = new HashMap<EntityFullJid, ChatMemberImpl>(members);
- for (ChatMemberImpl member : membersCopy.values())
+ for (EntityFullJid member : membersCopy.keySet())
+ logger.info("Simulating leaving for: " + member);
FIXME: we do not care about local user left for now