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
Was playing around with this lib trying to have a fault tolerant ws connection. Tried patches from different prs and forks, still there was a present problem with race - multiple reconnects occurring from time to time. Also making a custom heartbeat is a headache.
And realised, why not just wrap the ws listener in infinite cycle?
for {
select {
case <-ctx.Done():
return
default:
err := InitAndListenWs()
if err != nil {
....
}
}
}
No concurrency problems and easy to implement.
The text was updated successfully, but these errors were encountered:
Was playing around with this lib trying to have a fault tolerant ws connection. Tried patches from different prs and forks, still there was a present problem with race - multiple reconnects occurring from time to time. Also making a custom heartbeat is a headache.
And realised, why not just wrap the ws listener in infinite cycle?
No concurrency problems and easy to implement.
The text was updated successfully, but these errors were encountered: