Closed mve closed 2 years ago
Unfortunately I haven't been able to reproduce this warning message through your extensively detailed code, but I have gone ahead and fixed the code to reduce the amount of listeners that it uses in version 5.2.7
. Please try updating and verify that this issue has been fixed on your end.
Just did some quick testing and it seems to be working for me. I'm not getting the error anymore.
Good news, I'll go ahead and close this issue.
Describe the bug: I'm pinging a list of around 100 servers, batching them up in groups of 10 and waiting with Promise.allSettled for them to resolve. I get the following error:
Running with --trace-warnings i see the following:
I feel like increasing the maxlisteners shouldn't be needed as i'm waiting in batches of 10, which should mean that i'm never waiting on more than 10 servers, right?
Code: I set up this code example that you can use to recreate the issue. You need a list of many servers, you need to add them to the servers array in src/index.js.
package.json
src/index.js
Run the code
node src/index.js
Run this for more info on the error.
node --trace-warnings src/index.js
If you don't get the error on the first run, quickly run the same code again.
You can use this set of servers to test with:
Expected behavior: Not show this warning.
Additional context Using version 5.2.6 of minecraft-server-util. Using Node version 17.3.0.