[JDEV] Multiple resource: bug?!?

Max Horn max at quendi.de
Sun Apr 29 08:43:57 CDT 2001

Hi folks,

I just encountered a problem with resource handling. Let's assume I 
have two accounts: singleton at jabber.org and twin at jabber.org. Both 
have presence subscribed to/from each other.

Assume that I am online with both accounts (one resource each):
   singleton at jabber.org/LoneRaider
   twin at jabber.org/lefthalf

So both show up on each others roster as online.

Now I log in a third time, this time with a second resource at the 
"twin" account:
   twin at jabber.org/righthalf

This causes presence to be sent to both of the previously logged in 
accounts: to "singleton" because he's registered, and to "lefthalf" 
because it is a resource at the same account. Fine so far.

Now, I disconnect with one of the twin resource (doesn't seem to 
matter which, so let's assume it is "righthalf"). There are two 
possible ways of disconnecting, both should be allowed, but only one 
does the right thing for me:

1) Right before disconnecting, "righthalf"'s client broadcasts 
<presence type="unavailable"/>. Then both "singleton" and the other 
twin get it, as it should be. Then "righthalf" closes the 

2) Or "righthalf" just closes the stream/socket. Then, as it is 
guranteed in the docs, if I am not mistaken, "singleton" receives an 
unavailable presence. BUT KNOW THE BUG (?): his twin, "lefthalf", 
does *never* get an unavailable!!!

I am pretty certain this used to work correctly with the 1.0 (and 
possible 1.2) server.

Can anybody clarify me on this? Am I misinterpreting something, or is 
this indeed a bug, or does it work for everybody else and I just had 
the moon in a bad alignment to Jupiter and Saturn?


Max Horn
C++/ObjC/Java Developer

email: <mailto:max at quendi.de>
phone: (+49) 6151-494890

More information about the JDev mailing list