Open
Description
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.
Metadata
Assignees
Labels
No labels