nioc / xmpp-web

Lightweight web chat client for XMPP server
GNU Affero General Public License v3.0
144 stars 20 forks source link

Connection does not fallback to BOSH when websocket fails #22

Closed southerntofu closed 3 years ago

southerntofu commented 3 years ago

Enabling both websocket and BOSH in local.js i can't connect to MUC with Tor Browser. Not sure if that's because of my browser config or server misconfiguration, but in any case i expect the connection to fallback to BOSH, which it does not.

Disabling websocket in local.js allows me to connect via BOSH successfully. I haven't tried if changing the order of settings changes something.

nioc commented 3 years ago

I have seen this problem too using a corporate VPN. In earliest versions it was working, so I suppose I may have broke this 😞. I have to investigate further.

nioc commented 3 years ago

I have a lead, it seems the disconnected event do not always provide the error, as it is checked (error.type !== 'close') the BOSH fallback is not executed. I do not remember why I added this control 17 months ago, I will remove it and BOSH fallback will works again...

nioc commented 3 years ago

Could you test this 0.8.1-alpha release and confirm BOSH fallback works as expected?

southerntofu commented 3 years ago

Could you test this 0.8.1-alpha release and confirm BOSH fallback works as expected?

Fallback works perfectly! :)