Atmosphere / atmosphere-javascript

atmosphere-javascript
Apache License 2.0
122 stars 98 forks source link

[Safari] Network disconnection causes web socket failure #239

Open mwalklandIDBS opened 5 years ago

mwalklandIDBS commented 5 years ago

On Safari 11, a network disconnection causes the websocket to instantly close and never reconnect.

A _websocket.onclose event is fired as soon as the network is lost which closes the connection. This event does not seem to fire on all other browsers so a network disconnect is only closing our websocket on Safari.

In the console, the first error message is always WebSocket network error: The operation couldn't be completed. Socket is not connected.

We are using atmosphere js 2.3.6

jfarcand commented 5 years ago

@mwalklandIDBS Thanks for the report. I've no cycle to test this so if you find a solution do me a favor and do a pull request :-)