@seidor-cloud-produtos/orbit-backend-lib 2.0.119 → 2.0.120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -74,9 +74,6 @@ class AmqpQueue {
|
|
|
74
74
|
retryCount >= this.socketOptions?.retry?.maxCount) {
|
|
75
75
|
throw e;
|
|
76
76
|
}
|
|
77
|
-
if (retryCount === 0) {
|
|
78
|
-
await this.close().catch(() => null);
|
|
79
|
-
}
|
|
80
77
|
this.logger.info(`Retrying connection in... ${this.socketOptions.retry.intervalMs || 0}ms`);
|
|
81
78
|
await (0, timeout_1.sleep)(this.socketOptions.retry.intervalMs);
|
|
82
79
|
return await this.connect(vHost, retryCount + 1);
|
|
@@ -352,6 +349,7 @@ class AmqpQueue {
|
|
|
352
349
|
async treatReconnection(vHost) {
|
|
353
350
|
this.logger.info('⛔ Connection Error!!');
|
|
354
351
|
this.logger.info(`🔄 Try connection to the vHost ${vHost}`);
|
|
352
|
+
await this.close().catch(() => null);
|
|
355
353
|
AmqpQueue.instance = await this.connect(vHost);
|
|
356
354
|
await this.reconnectionChannels();
|
|
357
355
|
await this.publishMessagesOfMemory();
|