mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-05-19 06:59:56 +02:00
fix xsync counter initialization.
This commit is contained in:
parent
e55f5492ab
commit
18cee7421a
2
pool.go
2
pool.go
@ -56,7 +56,7 @@ func (pool *SimplePool) SubMany(ctx context.Context, urls []string, filters Filt
|
|||||||
uniqueEvents := make(chan *Event)
|
uniqueEvents := make(chan *Event)
|
||||||
seenAlready := xsync.NewMapOf[bool]()
|
seenAlready := xsync.NewMapOf[bool]()
|
||||||
|
|
||||||
pending := xsync.Counter{}
|
pending := xsync.NewCounter()
|
||||||
initial := len(urls)
|
initial := len(urls)
|
||||||
pending.Add(int64(initial))
|
pending.Add(int64(initial))
|
||||||
for _, url := range urls {
|
for _, url := range urls {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user