• Robert Knight's avatar
    Fix sending of WebSocket messages enqueued during a disconnection · 96c48706
    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
h Loading commit data...
scripts Loading commit data...
.hound.yml Loading commit data...
.jscsrc Loading commit data...
.jshintignore Loading commit data...
.jshintrc Loading commit data...
package.json Loading commit data...