Skip to content

Commit

Permalink
Fix some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Mar 29, 2024
1 parent 2d90753 commit 50dcbe9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/agent-base/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 50dcbe9

Please sign in to comment.