increase maxListeners
This commit is contained in:
parent
895be9f8de
commit
3c57a78f63
|
|
@ -492,9 +492,10 @@ export abstract class APIRequestContext extends SdkObject {
|
||||||
tcpConnectionAt = happyEyeBallsTimings.tcpConnectionAt;
|
tcpConnectionAt = happyEyeBallsTimings.tcpConnectionAt;
|
||||||
|
|
||||||
// non-happy-eyeballs sockets
|
// non-happy-eyeballs sockets
|
||||||
socket.on('lookup', () => { dnsLookupAt = monotonicTime(); });
|
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
|
||||||
socket.on('connect', () => { tcpConnectionAt = monotonicTime(); });
|
socket.once('lookup', () => { dnsLookupAt = monotonicTime(); });
|
||||||
socket.on('secureConnect', () => {
|
socket.once('connect', () => { tcpConnectionAt = monotonicTime(); });
|
||||||
|
socket.once('secureConnect', () => {
|
||||||
tlsHandshakeAt = monotonicTime();
|
tlsHandshakeAt = monotonicTime();
|
||||||
|
|
||||||
if (socket instanceof TLSSocket) {
|
if (socket instanceof TLSSocket) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue