diff --git a/lib/config_def.yaml b/lib/config_def.yaml index a5ac819d2..d9deb79a6 100644 --- a/lib/config_def.yaml +++ b/lib/config_def.yaml @@ -12,9 +12,9 @@ uplinks: npmjs: url: https://registry.npmjs.org/ - # amount of time to wait for repository to respond before giving up - # and use the local cached copy - timeout: 3000 + # amount of time (in milliseconds) to wait for repository to respond + # before giving up and use the local cached copy + #timeout: 30000 # maximum time (in seconds) in which data is considered up to date # diff --git a/lib/up-storage.js b/lib/up-storage.js index 1eab2bc5f..33c158895 100644 --- a/lib/up-storage.js +++ b/lib/up-storage.js @@ -33,13 +33,12 @@ function Storage(config, mainconfig) { this.config.url = this.config.url.replace(/\/$/, '') if (isNaN(parseFloat(this.config.timeout)) || !isFinite(this.config.timeout)) { - this.config.timeout = 5000 + this.config.timeout = 30000 } return this } function _setupProxy(hostname, config, mainconfig, isHTTPS) { -debugger; var no_proxy var proxy_key = isHTTPS ? 'https_proxy' : 'http_proxy'