earlier `.add()` on pool `_knownIds`.
This commit is contained in:
parent
6d116a2f7f
commit
687f387385
2
pool.ts
2
pool.ts
|
@ -55,6 +55,7 @@ export class SimplePool {
|
|||
let set = this._seenOn[id] || new Set()
|
||||
set.add(url)
|
||||
this._seenOn[id] = set
|
||||
_knownIds.add(id)
|
||||
return _knownIds.has(id)
|
||||
}
|
||||
|
||||
|
@ -80,7 +81,6 @@ export class SimplePool {
|
|||
if (!r) return
|
||||
let s = r.sub(filters, modifiedOpts)
|
||||
s.on('event', (event: Event) => {
|
||||
_knownIds.add(event.id as string)
|
||||
for (let cb of eventListeners.values()) cb(event)
|
||||
})
|
||||
s.on('eose', () => {
|
||||
|
|
Loading…
Reference in New Issue