diff --git a/internal/nostr/nostr.go b/internal/nostr/nostr.go index 463ecec..b70492e 100644 --- a/internal/nostr/nostr.go +++ b/internal/nostr/nostr.go @@ -809,7 +809,10 @@ func (svc *Service) handleResponseEvent(event *nostr.Event, subscription *Subscr subscription.EventChan <- event } svc.subscriptionsMutex.Lock() - svc.subscriptions[subscription.Uuid].Unsub() + sub, exists := svc.subscriptions[subscription.Uuid] + if exists { + sub.Unsub() + } svc.subscriptionsMutex.Unlock() }