1) reconnecting which fires immediately before the the underlying websocket is created
2) reconnectscheduled which fires when the next reconnect is scheduled and gives developers access to the delay value (so UIs like "Reconnecting in X seconds..." can be built more easily).
Coverage decreased (-0.8%) to 97.664% when pulling 5c048edb1af2f8d50f84501987c07cd58ca634e0 on bvandenbos:reconnect-scheduled-callback into 31a0f01af4c96dfb1ba0c17b1124de204cd0e513 on pladaria:master.
Coverage decreased (-0.8%) to 97.696% when pulling 0e60db75983b2eebe505f09a8b877f720b932a1f on bvandenbos:reconnect-scheduled-callback into 31a0f01af4c96dfb1ba0c17b1124de204cd0e513 on pladaria:master.
Coverage increased (+0.1%) to 98.585% when pulling 4fb22e1d4e82c919fc8e60ee21414b527403f0f3 on bvandenbos:reconnect-scheduled-callback into 31a0f01af4c96dfb1ba0c17b1124de204cd0e513 on pladaria:master.
Coverage decreased (-0.7%) to 97.797% when pulling 97b8d3be4a5aea832f1ace5f5ed005822a6b8fda on bvandenbos:reconnect-scheduled-callback into 31a0f01af4c96dfb1ba0c17b1124de204cd0e513 on pladaria:master.
Added two custom events:
1)
reconnecting
which fires immediately before the the underlying websocket is created 2)reconnectscheduled
which fires when the next reconnect is scheduled and gives developers access to the delay value (so UIs like "Reconnecting in X seconds..." can be built more easily).Also adds
reconnect()
to force a reconnect.Related issues: https://github.com/pladaria/reconnecting-websocket/issues/28 and https://github.com/pladaria/reconnecting-websocket/issues/38