ipfs / helia

An implementation of IPFS in JavaScript
https://helia.io
Other
915 stars 95 forks source link

fix: increase default listers on abort signals #484

Closed achingbrain closed 5 months ago

achingbrain commented 5 months ago

To prevent spurious warnings appearing in the console, increase the number of listeners on created abort signals.

Change checklist

achingbrain commented 5 months ago

I agree it's a shame this is necessary but it seems unlikely to stop being so given that we have a top-level abort signal being passed into a non-trivial set of operations, all of which need to be torn down if the signal fires it's "abort" event.

I don't think node should emit this warning, evidence of a memory leak is memory going up and not coming down, not listeners being added to an event emitter.