Websocket: should Tigase send a resource <conflict> stanza to the client before disconnecting the conflict-session
If the same user opens two websocket connection to tigase via web socket, and with the same resource, Tigase will disconnect the old one and let the new one connect. I think this is correct with XMPP. However, can tigase send a resource to the old connection before disconnecting it without any signaling? Something like this would be great for the client before disconnection.
<message xmlns="jabber:client"> <resource-conflict/> </message>
Right now, tigase disconnects the web socket without sending any reason, so the client does not know whether it should re-connect or not, as it might be a network hiccup.
Or maybe I missed something there? Thanks!
Added by Artur Hefczyc almost 5 years ago
Tigase does send a conflict error to the client. It is a stream error: http://xmpp.org/rfcs/rfc6120.html#streams-error-conditions-conflict
There are a few problems with this error though:
The error message is sent just before the TCP/IP connection is closed, so there is a chance that the error message is not delivered before connection closed, even though we make every effort on the server side to deliver the message
The error message (stream error) is sent, delivered and received by the client but the client (library) does not handle it correctly, because it does not understand the conflict error.