@seidor-cloud-produtos/orbit-backend-lib 2.0.117 → 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);
@@ -230,7 +233,7 @@ class AmqpQueue {
230
233
  }
231
234
  try {
232
235
  const promises = [
233
- this.publishToServerWaitForConfirms(exchangeName, domainEvent, buildedConfigs)
236
+ this.publishToServerWaitForConfirms(exchangeName, domainEvent, buildedConfigs),
234
237
  ];
235
238
  if (this.socketOptions?.timeoutSeconds) {
236
239
  promises.push(AmqpQueue.delayOperation(this.socketOptions.timeoutSeconds));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seidor-cloud-produtos/orbit-backend-lib",
3
- "version": "2.0.117",
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",