@seidor-cloud-produtos/orbit-backend-lib 2.0.118 → 2.0.119

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,6 +74,9 @@ 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
+ }
77
80
  this.logger.info(`Retrying connection in... ${this.socketOptions.retry.intervalMs || 0}ms`);
78
81
  await (0, timeout_1.sleep)(this.socketOptions.retry.intervalMs);
79
82
  return await this.connect(vHost, retryCount + 1);
@@ -349,7 +352,6 @@ class AmqpQueue {
349
352
  async treatReconnection(vHost) {
350
353
  this.logger.info('⛔ Connection Error!!');
351
354
  this.logger.info(`🔄 Try connection to the vHost ${vHost}`);
352
- await this.close().catch(() => null);
353
355
  AmqpQueue.instance = await this.connect(vHost);
354
356
  await this.reconnectionChannels();
355
357
  await this.publishMessagesOfMemory();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seidor-cloud-produtos/orbit-backend-lib",
3
- "version": "2.0.118",
3
+ "version": "2.0.119",
4
4
  "description": "Internal lib for backend components",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",