Disable keep alive, fixing issues with redirects taking too long.

This commit is contained in:
André Cruz
2013-05-14 21:55:50 +01:00
parent e479e84bde
commit 1e511dd655

View File

@@ -54,7 +54,8 @@ UrlResolver.prototype._hasNew = function (pkgMeta) {
proxy: this._remote.protocol === 'https:' ? this._config.httpsProxy : this._config.proxy,
strictSSL: this._config.strictSsl,
timeout: 5000,
headers: reqHeaders
headers: reqHeaders,
agent: false // Do not use keep alive, solves #437
})
// Compare new headers with the old ones
.spread(function (response) {
@@ -113,7 +114,8 @@ UrlResolver.prototype._download = function () {
proxy: this._remote.protocol === 'https:' ? this._config.httpsProxy : this._config.proxy,
strictSSL: this._config.strictSsl,
timeout: 5000,
headers: reqHeaders
headers: reqHeaders,
agent: false // Do not use keep alive, solves #437
})
.on('response', function (response) {
this._response = response;