From 4b100249a6cad67e002186816e64817313b636c7 Mon Sep 17 00:00:00 2001 From: Andreas Date: Sun, 28 Mar 2021 11:17:25 +0200 Subject: [PATCH] change 'maxsockets' default value back to 15 The default value for 'maxsockets' was changed during the refactoring in #2878 from 50 to 'Inifinity', this PR changes it to the more accurate value of 15, which was the default used in: https://github.com/npm/make-fetch-happen/blob/785af652ec0c8f108a43004903afd2183af93904/agent.js#L15 Fixes #2978 PR-URL: https://github.com/npm/cli/pull/2979 Credit: @wallrat Close: #2979 Reviewed-by: @ruyadorno Co-authored-by: Gar --- docs/content/using-npm/config.md | 2 +- lib/utils/config/definitions.js | 2 +- tap-snapshots/test-lib-utils-config-describe-all.js-TAP.test.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/content/using-npm/config.md b/docs/content/using-npm/config.md index c701a361afbb9..cfce5396f40a7 100644 --- a/docs/content/using-npm/config.md +++ b/docs/content/using-npm/config.md @@ -795,7 +795,7 @@ Show extended information in `npm ls` and `npm search`. #### `maxsockets` -* Default: Infinity +* Default: 15 * Type: Number The maximum number of connections to use per origin (protocol/host/port diff --git a/lib/utils/config/definitions.js b/lib/utils/config/definitions.js index 512ea8af98cb4..db66aa495ba0f 100644 --- a/lib/utils/config/definitions.js +++ b/lib/utils/config/definitions.js @@ -1154,7 +1154,7 @@ define('long', { }) define('maxsockets', { - default: Infinity, + default: 15, type: Number, description: ` The maximum number of connections to use per origin (protocol/host/port diff --git a/tap-snapshots/test-lib-utils-config-describe-all.js-TAP.test.js b/tap-snapshots/test-lib-utils-config-describe-all.js-TAP.test.js index a85f90ac84181..2a3d0146b187d 100644 --- a/tap-snapshots/test-lib-utils-config-describe-all.js-TAP.test.js +++ b/tap-snapshots/test-lib-utils-config-describe-all.js-TAP.test.js @@ -674,7 +674,7 @@ Show extended information in \`npm ls\` and \`npm search\`. #### \`maxsockets\` -* Default: Infinity +* Default: 15 * Type: Number The maximum number of connections to use per origin (protocol/host/port