Coverage increased (+0.02%) to 98.485% when pulling 302bcb694f41c21a55e967399a92d3a4689e27e3 on chbdetta:master into 31a0f01af4c96dfb1ba0c17b1124de204cd0e513 on pladaria:master.
I've just released a full rewrite of this library and this case should be covered. There are lots of breaking changes, please have a look at the readme.
Not stoping the
connectingTImeout
counter onclose
event will sometime close the wrong websocket.Some routine like this will happen:
connectionTimeout = 4000
,maxRetries = 10
,reconnectDelay = 1000
connect()
.connectingTimeout
asconnectingTimeout#1
.handleClose
.connect()
again.connectingTimeout
asconnectingTimeout#2
.open
event.clearTimeout(connectingTimeout#2)
<=== note thatconnectingTimeout#2
is cleared butconnectingTimeout#1
is not!connectingTimeout#1
calls,ws.close()
<==== This will close the connected websocketI stop the
connectingTimeout
inclose
event, so that it won't close connected ws.