From 50dcbe93aaae8380e4c7294adcda9469567c3f4b Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Fri, 29 Mar 2024 15:37:41 -0700 Subject: [PATCH] Fix some comments --- packages/agent-base/src/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/agent-base/src/index.ts b/packages/agent-base/src/index.ts index da58f52..8498753 100644 --- a/packages/agent-base/src/index.ts +++ b/packages/agent-base/src/index.ts @@ -78,12 +78,12 @@ export abstract class Agent extends http.Agent { } // In order to support async signatures in `connect()` and Node's native - // connection pooling in http.Agent, the array of sockets for each origin has - // to be updated syncronously. This is so the length of the array is accurate + // connection pooling in `http.Agent`, the array of sockets for each origin has + // to be updated synchronously. This is so the length of the array is accurate // when `addRequest()` is next called. We achieve this by creating a fake socket - // and adding it to this.sockets and incrementing totalSocketCount. + // and adding it to `sockets[origin]` and incrementing `totalSocketCount`. private incrementSockets(name: string) { - // If maxSockets and maxTotalSockets are both Infinity then there is no need + // If `maxSockets` and `maxTotalSockets` are both Infinity then there is no need // to create a fake socket because Node.js native connection pooling will // never be invoked. if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) {