• Nick Stenning's avatar
    Ensure websocket always waits before reconnecting · 889fe9e0
    Nick Stenning authored
    Currently, if the websocket connection fails, then we will always
    immediately attempt a reconnect. This can easily contribute to a
    thundering herd problem if all WebSocket clients (or even a large
    portion of them) are disconnected simultaneously.
    
    This commit ensures that an aborted connection always results in at
    least a 1s-2s (randomized) delay.
    889fe9e0
websocket-test.js 2.58 KB