setting default timeout to 30 seconds, #18

This commit is contained in:
Alex Kocharin 2013-12-08 02:37:27 +04:00
parent cc7165dd3c
commit 6e71913c46
2 changed files with 4 additions and 5 deletions

View File

@ -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
#

View File

@ -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'