Reconnection logic / Empty `closedResolver`
See original GitHub issueHi!
I try to test some reconnection logic. So I’m basically doing something like this:
server.close({ code: 1001, reason: "Something went wrong!", wasClean: true });
await server.closed;
await server.connected; // problematic...
But it seems that the connection is not “cleaned up” after a close. The closedResolver
is doing nothing: closedResolver!: () => void;
. So, the last line in my code seems to be always true (I think from the first “connection”), because the open event is not fired again. Is it possible to alter the closedResolver
somehow? Or did I oversee something?
Great library, btw!
Best regards, Kersten
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Implementing reconnection logic in a Java EE application - IBM
In practice, this method prevents many reconnect attempts. Note that exit conditions have been omitted from the example for clarity. private void setupResources ......
Read more >c# - .NET SqlConnection class, connection pooling and ...
The database was "disconnected", then "reconnected". I notice that there is a "State" property on SqlConnection... is there an appropriate way to query...
Read more >Does not work with React <= 16.8.6,about romgain/jest-websocket ...
Putting asynchronous logic inside ReactTestUtils.act(. ... Reconnection logic / Empty `closedResolver` HOT 14; server.error() removes the server from the ...
Read more >Reconnection States and Events - Programmable Video - Twilio
An introduction to Programmable Video reconnection states and events, providing guidance and sample code to show how to use them in your applications....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Oh sorry for the delay, Romain. I’ve circumnavigated the problem somehow. It is not ideal, but for the tests ok. Thank you for your patience!
I’ll close this for now, but feel free to reopen if you have any suggestions!