Standardise increasing the event limit for events #105
Labels
development
Standard development
r&d:polykey:core activity 4
End to End Networking behind Consumer NAT Devices
Specification
Right now in certain cases we have an
EventTarget
or aAbortSignal
which has many registered listeners. Usually when multiple children classes need to listen to a parent. EG, multipleQUICConnection
s perQUICServer
, or multipleQUICStream
s perQUICConnection
. By default, when we exceed 11 listeners we get the following warning.Currently this has been addressed in two locations with the following.
But we want to standardise how this is generally done and avoid magic numbers in random places in the code. The limit should also configurable in some way. At the very least the
nodesEvents.setMaxListeners
should be moved into a utility function to avoid spreading out the magic.Additional context
Relevant discussion: https://github.com/MatrixAI/js-quic/pull/104/files#r1626356768
Tasks
nodesEvents.setMaxListeners
usage should be standardised and quarantined into a utility function.The text was updated successfully, but these errors were encountered: