promise-poller
Advanced tools
Comparing version 1.5.0 to 1.5.1
@@ -60,2 +60,3 @@ 'use strict'; | ||
return new _bluebird2.default(function (resolve, reject) { | ||
var polling = true; | ||
var retriesRemaining = options.retries; | ||
@@ -65,5 +66,8 @@ var rejections = []; | ||
if (options.masterTimeout) { | ||
debug('(' + options.name + ') Using master timeout of ' + options.masterTimeout + ' ms.'); | ||
setTimeout(function () { | ||
return reject('master timeout'); | ||
}, options.globalTimeout); | ||
debug('(' + options.name + ') Master timeout reached. Rejecting master promise.'); | ||
polling = false; | ||
reject('master timeout'); | ||
}, options.masterTimeout); | ||
} | ||
@@ -97,3 +101,3 @@ | ||
reject(rejections); | ||
} else { | ||
} else if (polling) { | ||
debug('(' + options.name + ') Poll failed. ' + retriesRemaining + ' retries remaining.'); | ||
@@ -100,0 +104,0 @@ |
{ | ||
"name": "promise-poller", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "A basic poller built on top of promises", | ||
@@ -5,0 +5,0 @@ "main": "dist/lib/promise-poller.js", |
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
24151
417