Skip to content

Commit

Permalink
cache: Add maxsockets config setting for registry client
Browse files Browse the repository at this point in the history
PR-URL: npm#11666
Credit: @misterbyrne
Reviewed-By: @iarna
  • Loading branch information
misterbyrne authored and iarna committed Feb 25, 2016
1 parent 3d26453 commit f7be667
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions doc/misc/npm-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,14 @@ colored output if it is a TTY.

Show extended information in `npm ls` and `npm search`.

### maxsockets

* Default: 50
* Type: Number

The maximum number of connections to use per origin (protocol/host/port
combination). Passed to the `http` `Agent` used to make the request.

### message

* Default: "%s"
Expand Down
3 changes: 2 additions & 1 deletion lib/cache/caching-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ function adaptConfig (config) {
userAgent: config.get('user-agent'),
log: log,
defaultTag: config.get('tag'),
couchToken: config.get('_token')
couchToken: config.get('_token'),
maxSockets: config.get('maxsockets')
}
}
2 changes: 2 additions & 0 deletions lib/config/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ Object.defineProperty(exports, 'defaults', {get: function () {
loglevel: 'warn',
logstream: process.stderr,
long: false,
maxsockets: 50,
message: '%s',
'node-version': process.version,
npat: false,
Expand Down Expand Up @@ -276,6 +277,7 @@ exports.types = {
loglevel: ['silent', 'error', 'warn', 'http', 'info', 'verbose', 'silly'],
logstream: Stream,
long: Boolean,
maxsockets: Number,
message: String,
'node-version': [null, semver],
npat: Boolean,
Expand Down

0 comments on commit f7be667

Please sign in to comment.