• Nick Stenning's avatar
    Tune the websocket autoreconnect to minimise thundering herd effect · ae7b85a7
    Nick Stenning authored
    The client websocket code will automatically attempt to reconnect on
    error or disconnection. This commit:
    
    - Randomises the delay before reconnection
    - Wait two seconds before attempting to reconnect (meaning the real
      delay will be between 2 and 4 seconds) -- this is an attempt to spread
      out reconnections over a longer period.
    - Makes it stop retrying after 10 attempts (i.e. roughly 30 minutes)
    ae7b85a7
websocket.js 2.81 KB