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
Currently I do it this way, but find it rather unclean:
for {
if!ws.IsConnected() {
time.Sleep(time.Second*2)
continue
}
// Do stuff with connection
}
One idea I have is to export the getBackoff() method to wait for the correct time until trying to read a new message. Another idea is to have a method WaitConnection() / EnsureConnection(), which blocks until the connection is reestablished. I am happy to create a PR for either of the proposals.
The text was updated successfully, but these errors were encountered:
masseelch
changed the title
[proposal] Is there a way to wait for the connection to be reestablished in case of connection loss?
[proposal] Method to wait for re-connect after connection loss.
Jun 10, 2021
masseelch
changed the title
[proposal] Method to wait for re-connect after connection loss.
[proposal] Method to wait for re-connect after connection loss
Jun 10, 2021
Currently I do it this way, but find it rather unclean:
One idea I have is to export the
getBackoff()
method to wait for the correct time until trying to read a new message. Another idea is to have a methodWaitConnection()
/EnsureConnection()
, which blocks until the connection is reestablished. I am happy to create a PR for either of the proposals.The text was updated successfully, but these errors were encountered: