prevent halting when a relay gets disconnected.

This commit is contained in:
fiatjaf 2023-06-22 10:45:45 -03:00
parent fd409f6c35
commit f78270765d
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1

View File

@ -206,7 +206,7 @@ func (r *Relay) Connect(ctx context.Context) error {
ticker.Stop()
// close all subscriptions
r.Subscriptions.Range(func(_ string, sub *Subscription) bool {
sub.Unsub()
go sub.Unsub()
return true
})
return