This warning from NodeJS is emitted when there are more than 10 connections in one session and they're being closed:
(node:7050) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 disconnected listeners added to [Connection]. Use emitter.setMaxListeners() to increase limit
(Use node --trace-warnings ... to show where the warning was created)
Although this warning is generally helpful in detecting leaks, the user has already made a conscious decision to connect to that many connections and the warning is not helpful to them in this context. They're already trying to close those connections, and, in that process, we need to install listeners for disconnection events.
To disable this warning, this PR raises the limit on max listeners to 1000 for connections.
This warning from NodeJS is emitted when there are more than 10 connections in one session and they're being closed:
Although this warning is generally helpful in detecting leaks, the user has already made a conscious decision to connect to that many connections and the warning is not helpful to them in this context. They're already trying to close those connections, and, in that process, we need to install listeners for disconnection events.
To disable this warning, this PR raises the limit on max listeners to 1000 for connections.