amqp-connection-manager
Advanced tools
Comparing version 4.1.0 to 4.1.1
@@ -84,2 +84,6 @@ "use strict"; | ||
}; | ||
let waitTimeout; | ||
if (timeout) { | ||
waitTimeout = (0, helpers_js_1.wait)(timeout); | ||
} | ||
try { | ||
@@ -92,5 +96,5 @@ await Promise.race([ | ||
}), | ||
...(timeout | ||
...(waitTimeout | ||
? [ | ||
(0, helpers_js_1.wait)(timeout).promise.then(() => { | ||
waitTimeout.promise.then(() => { | ||
throw new Error('amqp-connection-manager: connect timeout'); | ||
@@ -103,2 +107,3 @@ }), | ||
finally { | ||
waitTimeout === null || waitTimeout === void 0 ? void 0 : waitTimeout.cancel(); | ||
this.removeListener('connectFailed', onConnectFailed); | ||
@@ -105,0 +110,0 @@ } |
@@ -79,2 +79,6 @@ import amqp from 'amqplib'; | ||
}; | ||
let waitTimeout; | ||
if (timeout) { | ||
waitTimeout = wait(timeout); | ||
} | ||
try { | ||
@@ -87,5 +91,5 @@ await Promise.race([ | ||
}), | ||
...(timeout | ||
...(waitTimeout | ||
? [ | ||
wait(timeout).promise.then(() => { | ||
waitTimeout.promise.then(() => { | ||
throw new Error('amqp-connection-manager: connect timeout'); | ||
@@ -98,2 +102,3 @@ }), | ||
finally { | ||
waitTimeout === null || waitTimeout === void 0 ? void 0 : waitTimeout.cancel(); | ||
this.removeListener('connectFailed', onConnectFailed); | ||
@@ -100,0 +105,0 @@ } |
{ | ||
"name": "amqp-connection-manager", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "Auto-reconnect and round robin support for amqplib.", | ||
@@ -5,0 +5,0 @@ "module": "./dist/esm/index.js", |
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
141052
2467