You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Failing to close a websocket connection when autoReconnect is set to true #577
I'm authoring a service that schedules websocket connections to a diverse set of workers. When there is an intermittent connection on one worker and the websocket connection needs to be relocated to another, I can't manage to dispose the instance with failure. It doesn't help to call the function close 'cause it fails to set the variable _isClosing to true since the connection isn't open yet. Also, after the next unsuccessful attempt, it sets the variable _isReconnecting to true so that the condition for reconnection always evaluates to true and continues forever.
Steps to reproduce
Construct a WSv2 instance with autoReconnect set to true
Disable the network interface that provides the instance with internet connection
Call the function close on the WSv2 instance and see for yourself that it doesn't dispose the instance while continuing to register timeouts for reconnection
Additional Notes:
For now, I'm making use of a workaround as follows to overcome this issue:
changed the title [-]Fails to close a websocket connection with autoReconnect set to true [/-][+]Failing to close a websocket connection when autoReconnect set to true [/+]on May 31, 2022
changed the title [-]Failing to close a websocket connection when autoReconnect set to true [/-][+]Failing to close a websocket connection when autoReconnect is set to true [/+]on May 31, 2022
Activity
[-]Fails to close a websocket connection with autoReconnect set to true [/-][+]Failing to close a websocket connection when autoReconnect set to true [/+][-]Failing to close a websocket connection when autoReconnect set to true [/-][+]Failing to close a websocket connection when autoReconnect is set to true [/+]