Comparing version 2.1.2 to 2.1.3
@@ -214,4 +214,9 @@ 'use strict'; | ||
async maybeRetry(err, retries) { | ||
const allowed = require('is-retry-allowed'); | ||
if (retries < 5 && err.code && allowed(err)) { | ||
const allowed = err => { | ||
if (retries >= 5) return false; | ||
if (!err.code) return false; | ||
if (err.code === 'ENOTFOUND') return true; | ||
return require('is-retry-allowed')(err); | ||
}; | ||
if (allowed(err)) { | ||
let noise = Math.random() * 100; | ||
@@ -218,0 +223,0 @@ await this._wait((1 << retries) * 1000 + noise); |
{ | ||
"name": "http-call", | ||
"description": "make http requests", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"author": "Jeff Dickey @dickeyxxx", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/dickeyxxx/http-call/issues", |
Sorry, the diff of this file is not supported yet
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
22844
332