-
Robert Knight authored
Any WebSocket messages submitted whilst the WS is disconnected should be re-sent when the WS reconnects. This was broken because upon a disconnect, the 'onclose' event handler first synchronously called reconnect(), resulting in a new WebSocket instance being created and then set 'socket' to null. This caused an error in sendMessages() after the 'onopen' event was triggered. Fix the problem by not using a null 'socket' var to represent a disconnected socket. Instead just use the WebSocket's readyState property.
96c48706
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
browser/firefox | ||
static | ||
templates/client |