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
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:
With this in place, I can call the function dispose and get rid of the instance completely
The text was updated successfully, but these errors were encountered:
barhun
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
May 31, 2022
barhun
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
May 31, 2022
Issue type
Brief description
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
totrue
since the connection isn't open yet. Also, after the next unsuccessful attempt, it sets the variable_isReconnecting
totrue
so that the condition for reconnection always evaluates to true and continues forever.Steps to reproduce
autoReconnect
set totrue
close
on the WSv2 instance and see for yourself that it doesn't dispose the instance while continuing to register timeouts for reconnectionAdditional Notes:
dispose
and get rid of the instance completelyThe text was updated successfully, but these errors were encountered: