Buggy MUC presence?

Hi!

I am having some problems getting MUC presence to work correctly.

I have a MUC room and I have registered a ParticipantListener with muc.addParticipantListener:

muc.addParticipantListener(new PacketListener() {
public void processPacket(Packet packet) {

System.out.println(“Participant Listener evoked”);

}

}

The problem is that the callback to processPacket is only executed when someone joins the room, not when they leave.

With the debug information turned on, I can see that I receive a presence packet with type “unavailable”, but the callback is not evoked?

Sometimes it works just fine, but if I restart my application it stops working again.

I get the exact same behavior when using the ParticpantStatusListener with the “Joined” and “Left” callbacks?

Any help is much appreciated!

Cheers!

Is your program multithreaded? Maybe your MUC is blocking on another methode?

I was having problems with this in this case:

User A joins

User B joins -> A received joined message

User A leaves/disconnectes

User B leaves/disconnectes

User A joins again

User B joins again -> User A recieveds message BUT if the message was the same as the previous recieved there will be no event! User A cashes the messages, and didnt receive the left message because he wasn’t in that room at the moment. The MUC will cashes this events, but will never clear this. Even when the listener is removed and added again the problem is there.

I still have no fix for this, maybe someone else?