We are using a networking library (libp2p) which has a transitive dependency on pEvent. We have identified a race condition where pEvent misses the 'open' event emitted by a DataChannel. The code in pEvent appears to synchronously build up a set of Promises to implement it's functionality, so it appears this race condition would not be possible. However, I wonder if because the 'open' event is being emitted by native code, the event can in fact be raised while pEvent is setting up its event handler.
We have a reproducible problem, with a functioning workaround, so we have a pretty high level of confidence that this is what is happening. I don't have anyway to verify, but it seems that this issue could also occur with any other 'native' events, such as DOM events, etc.
The details on the issue are captured in this issue on the downstream library:
libp2p/js-libp2p#2443
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too