mirror of
https://github.com/logos-messaging/logos-messaging-go.git
synced 2026-01-28 18:43:13 +00:00
Check nils when deliting subscription (#691)
This commit is contained in:
parent
6463dbeb70
commit
8ad08d6b04
@ -379,7 +379,7 @@ func (wf *WakuFilterLightNode) Unsubscribe(ctx context.Context, contentFilter Co
|
||||
localWg.Wait()
|
||||
close(resultChan)
|
||||
for _, peerID := range peersUnsubscribed {
|
||||
if len(wf.subscriptions.items[peerID].subscriptionsPerTopic) == 0 {
|
||||
if wf.subscriptions != nil && wf.subscriptions.items != nil && wf.subscriptions.items[peerID] != nil && len(wf.subscriptions.items[peerID].subscriptionsPerTopic) == 0 {
|
||||
delete(wf.subscriptions.items, peerID)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user