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
Problem: hundreds of WebSocket connections are kept open even if they aren't being used.
Why use backoff at all? Because this is part of a distributed system.
If the WebSocket connection dies, I only want it to reconnect if I have an active subscription open in my system. Then when a method is called and the socket is closed, it checks if it COULD be open (ie it's "eligible" to be opened according to the Backoff), and if so it reopens the connection at that time.
What I tried:
Custom Backoff class. It only exposes the millisecond delay, not whether or not it should reconnect.
Calling socket.close() manually (or setting closedByUser manually). There is no method to reopen it.
Now that I've typed this all out, it seems possible that you could close the socket manually while keeping the backoff and queue stored locally, and then recreate it with the same backoff and queue if you want to reopen. 🤔 But I'm not sure.
The text was updated successfully, but these errors were encountered:
Problem: hundreds of WebSocket connections are kept open even if they aren't being used.
Why use backoff at all? Because this is part of a distributed system.
If the WebSocket connection dies, I only want it to reconnect if I have an active subscription open in my system. Then when a method is called and the socket is closed, it checks if it COULD be open (ie it's "eligible" to be opened according to the Backoff), and if so it reopens the connection at that time.
What I tried:
Backoff
class. It only exposes the millisecond delay, not whether or not it should reconnect.socket.close()
manually (or settingclosedByUser
manually). There is no method to reopen it.Now that I've typed this all out, it seems possible that you could close the socket manually while keeping the backoff and queue stored locally, and then recreate it with the same backoff and queue if you want to reopen. 🤔 But I'm not sure.
The text was updated successfully, but these errors were encountered: