Community
Participate
Working Groups
Created attachment 144809 [details] Test case Steps To Reproduce: 1. Connect a user with a resource ID (user@host/resource). 2. Disconnect the user. 3. Connect the same user with a different resource ID (user@host/resource2). => The user now appears twice in the roster, once with the old and once with the new resource. If resource IDs are generated randomly, this causes disconnected entries to be never removed. The attached patch contains a new test case that fails due to this problem.
Created attachment 144944 [details] Test case Updated the test to include an additional test case where the same user connects twice with different resource names.
Created attachment 144945 [details] Proposed patch This is a patch that fixes the problem. Essentially, this restores some code from an earlier CVS revision (XMPPContainerPresenceHelper.java, 1.39) which removes the entry from the roster if a user disconnects but is still connected with some other resource.
(In reply to comment #2) > Created an attachment (id=144945) [details] > Proposed patch > > This is a patch that fixes the problem. Essentially, this restores some code > from an earlier CVS revision (XMPPContainerPresenceHelper.java, 1.39) which > removes the entry from the roster if a user disconnects but is still connected > with some other resource. > Hi Jorg. First, thanks for the patch/fix and test case...it all looks good and I've applied/tested and released both patches to HEAD. I'll resolve this bug as fixed. Have you had occasion to test this against more than one xmpp server/service? The reason I ask is that I believe xmpp servers are sometimes inconsistent in how/when they specify jids (i.e. with/without resource identifiers, etc). I'm frankly not sure whether there is something unspecified/ambiguous about XMPP or whether implementations just differ, but it could be an issue. Thanks.
> Have you had occasion to test this against more than one xmpp server/service? No, unfortunately not. I have tested only with the Openfire server.