I experience a quite strange behavior using smack to build a small XMPP Client/Bot. I set up the connection as well as a ConnectionListener and a ChatManagerListener. This works quite fine and I can then chat with my application which is running on a portable device.
To test behavior on lost connection I plugged out the ethernet cable of the portable device. I expected the XMPP client to lose the connection and that the user will be set 'offline' in the roster of the users buddies. What happens is, that this user is still shown as 'online' and ConnectionListener of my client fires nothing, whether connectionClosed nor reconnectionFailed or else.
When I then plug the ethernet cable back in, sometimes it's like the connection has been alive all the time. The offline messages are handled and I can chat again like before. Other times my client is totally inaccessible and out of order, seems like all the listeners are gone... But no excpetions are thrown.
That's a quite strange and uncontrollable behavior that would make the whole client unusable for me, as I can't be sure that the client will come up again after connection has been arborted.
Has anybody else experienced such problems or has any hints what's (not) happening?
If needed I can provide my code, but it's actually just copy & paste from the Smack documentation.