Closed flyweight closed 5 years ago
In _handleOpen, the _uptimeTimeout variable is set to call _acceptOpen after a set amount of time. Currently, _acceptOpen is always called because _uptimeTimeout is never cleared if the connection happens to close during the period.
_handleOpen
_uptimeTimeout
_acceptOpen
https://github.com/pladaria/reconnecting-websocket/blob/5074de85b0d1ba94190260a32be5453bcd4e30e1/dist/reconnecting-websocket-iife.js#L489
During a disconnect, the _uptimeTimeout should be cleared properly.
Hi,
This problem has been fixed in latest release (v4.1.7).
Thanks for reporting!
Thanks, @pladaria 👍
Actual Behavior
In
_handleOpen
, the_uptimeTimeout
variable is set to call_acceptOpen
after a set amount of time. Currently,_acceptOpen
is always called because_uptimeTimeout
is never cleared if the connection happens to close during the period.https://github.com/pladaria/reconnecting-websocket/blob/5074de85b0d1ba94190260a32be5453bcd4e30e1/dist/reconnecting-websocket-iife.js#L489
Expected Behavior
During a disconnect, the
_uptimeTimeout
should be cleared properly.