npm-registry-client
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -117,3 +117,11 @@ module.exports = regRequest | ||
var statusCode = response && response.statusCode | ||
var statusRetry = !statusCode || (statusCode === 408 || statusCode >= 500) | ||
var reauth = statusCode === 401 | ||
var timeout = statusCode === 408 | ||
var serverError = statusCode >= 500 | ||
var statusRetry = !statusCode || timeout || serverError | ||
if (reauth && this.auth && this.token) { | ||
this.token = null | ||
this.couchLogin.token = null | ||
return regRequest.call(this, method, where, what, etag, nofollow, cb_) | ||
} | ||
if (er && statusRetry && operation.retry(er)) { | ||
@@ -124,4 +132,4 @@ self.log.info("retry", "will retry, error on last attempt: " + er) | ||
cb.apply(null, arguments) | ||
}) | ||
}) | ||
}.bind(this)) | ||
}.bind(this)) | ||
} | ||
@@ -128,0 +136,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "Client for the npm registry", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "url": "git://github.com/isaacs/npm-registry-client" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65836
1019