XMPPConnection disconnect causes other XMPPConnection to go offline

I have an app with an XMPPConnection that’s connected and logged in as user x. I’m also logged into Spark as user y, and x is in y’s contact list, and his presence is “online”. Openfire (my XMPP server) shows a session for x with the resource “Smack”.

In my app, I have a feature to test the XMPP credentials, which does so by connecting to the XMPP server using a different resource “TestResource”, then it disconnects. During this test, Openfire shows a session for x with the resource “TestResource”. The problem is that when I execute the test, x in y’s contact list in Spark appears to go offline. If y logs out and back into Spark, though, x appears online again.

It seems like Spark is getting the offline presence from the test XMPPConnection disconnect and just assumes the user is offline without checking the resource qualifier.

Can anyone please explain what’s going on?

Anybody manning this forum?