ondisconnect not being triggered
There are some cases when ondisconnect event is not being triggered. If we have some logged in user and then another user will log in using same credentials, then on first user side 2 event will be triggered: onStatusChanged with session-terminate-conflict and onerror with error code of 503. But even if in both cases I would call JSJaCWebSocketConnection.disconnect() - it still would to trigger ondisconnect event so there are no one point where I can definitely say that it was disconnected.
At the time onStatusChanged triggered xmpp.connected() return true but later, in onerror, it is already disconnected. So I suppose ondisconnect should be triggered between them. For the moment I fixed it with calling xmpp.disconnect() manually in onStatusChanged but still suppose such a behavior is a bug.