prevent halting when a relay gets disconnected.
This commit is contained in:
2
relay.go
2
relay.go
@@ -206,7 +206,7 @@ func (r *Relay) Connect(ctx context.Context) error {
|
|||||||
ticker.Stop()
|
ticker.Stop()
|
||||||
// close all subscriptions
|
// close all subscriptions
|
||||||
r.Subscriptions.Range(func(_ string, sub *Subscription) bool {
|
r.Subscriptions.Range(func(_ string, sub *Subscription) bool {
|
||||||
sub.Unsub()
|
go sub.Unsub()
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user