npm / npm-registry-client

http://npm.im/npm-registry-client
ISC License
264 stars 108 forks source link

Set a default timeout for requests #174

Open jdforrester opened 6 years ago

jdforrester commented 6 years ago

Follow-up from https://phabricator.wikimedia.org/T198348#4321573 and reported in https://github.com/npm/npm/issues/21101 https://github.com/npm/npm/issues/21102 and https://github.com/npm/npm/issues/21103.

Looks like opts in lib/request.js should have some value set for timeout so that we don't wait indefinitely for the upstream server to respond. Maybe 30000 (/i.e./, 30 seconds)?