revert maxlisteners change

This commit is contained in:
Simon Knott 2024-10-04 14:16:58 +02:00
parent 20bcb49bd6
commit 5cf1003575
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -496,8 +496,6 @@ export abstract class APIRequestContext extends SdkObject {
tcpConnectionAt = happyEyeBallsTimings.tcpConnectionAt;
// non-happy-eyeballs sockets
socket.setMaxListeners(100); // default is 10. there might be more than 10 requests to the same server in parallel, and they all use the same socket
const onLookup = () => { dnsLookupAt = monotonicTime(); };
socket.once('lookup', onLookup);
cleanup.push(() => socket.removeListener('lookup', onLookup));