mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-08-08 20:21:43 +02:00
maybe fix logic for closing waitgroup in subMany()
This commit is contained in:
2
pool.go
2
pool.go
@@ -312,7 +312,7 @@ func (pool *SimplePool) subMany(
|
|||||||
close(events)
|
close(events)
|
||||||
cancel(fmt.Errorf("aborted: %w", context.Cause(ctx)))
|
cancel(fmt.Errorf("aborted: %w", context.Cause(ctx)))
|
||||||
}
|
}
|
||||||
if !eosed.Load() {
|
if eosed.CompareAndSwap(false, true) {
|
||||||
eoseWg.Done()
|
eoseWg.Done()
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
Reference in New Issue
Block a user