hannesm / jackline

minimalistic secure XMPP client in OCaml
BSD 2-Clause "Simplified" License
250 stars 20 forks source link

Simutanously running jacklines disconnect each other #175

Closed sternenseemann closed 6 years ago

sternenseemann commented 6 years ago

Reproduction

Result

I'll try to reproduce this issue further and post it here.

infinity0 commented 6 years ago

This is possibly because they are using the same jabber resource (jid user@domain/resource), servers will automatically disconnect one client if two connect with the same resource. The fix is to either make jackline support a jid without a resource, or you need to manually edit the configs to have different jids.

hannesm commented 6 years ago

as @infinity0 said, the workaround is to have two different configs (using a different resource).

the other option, to let the server choose the resource for you, is not implemented yet, and tracked as #155 in this issue tracker.

closing this issue since it is the expected behaviour with the current implementation.

sternenseemann commented 6 years ago

I see!

I guess the only thing to improve here is the error message? It is a bit misleading to have a async Xml parse error instead of being told, that the server disconnected the client actively.

hannesm commented 6 years ago

yes, making the error message more clear would be great. unfortunately this is and exception raised deep inside the xml library and I'm atm not sure how to improve it (without rewriting the xml&xmpp interface, as indicated in https://hannes.nqsb.io/Posts/Jackline)