@opra/rabbitmq 1.11.1 → 1.12.0

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.
@@ -330,14 +330,14 @@ class RabbitmqAdapter extends core_1.PlatformAdapter {
330
330
  context.errors.push(error);
331
331
  context.errors = this._wrapExceptions(context.errors);
332
332
  if (context.listenerCount('error')) {
333
- await this.emitAsync('error', context.errors[0], context);
333
+ await context.emitAsync('error', context.errors[0], context);
334
334
  }
335
335
  if (logger?.error) {
336
336
  context.errors.forEach(err => logger.error(err));
337
337
  }
338
- return;
339
338
  }
340
- this.logger?.error(error);
339
+ else
340
+ logger?.error(error);
341
341
  if (this.listenerCount('error'))
342
342
  this.emit('error', error);
343
343
  })
@@ -326,14 +326,14 @@ export class RabbitmqAdapter extends PlatformAdapter {
326
326
  context.errors.push(error);
327
327
  context.errors = this._wrapExceptions(context.errors);
328
328
  if (context.listenerCount('error')) {
329
- await this.emitAsync('error', context.errors[0], context);
329
+ await context.emitAsync('error', context.errors[0], context);
330
330
  }
331
331
  if (logger?.error) {
332
332
  context.errors.forEach(err => logger.error(err));
333
333
  }
334
- return;
335
334
  }
336
- this.logger?.error(error);
335
+ else
336
+ logger?.error(error);
337
337
  if (this.listenerCount('error'))
338
338
  this.emit('error', error);
339
339
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opra/rabbitmq",
3
- "version": "1.11.1",
3
+ "version": "1.12.0",
4
4
  "description": "Opra RabbitMQ package",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
@@ -13,8 +13,8 @@
13
13
  "valgen": "^5.13.0"
14
14
  },
15
15
  "peerDependencies": {
16
- "@opra/common": "^1.11.1",
17
- "@opra/core": "^1.11.1",
16
+ "@opra/common": "^1.12.0",
17
+ "@opra/core": "^1.12.0",
18
18
  "amqplib": "^0.10.5"
19
19
  },
20
20
  "type": "module",
@@ -23,7 +23,7 @@ export declare class RabbitmqAdapter extends PlatformAdapter {
23
23
  static readonly PlatformName = "rabbitmq";
24
24
  protected _config: RabbitmqAdapter.Config;
25
25
  protected _controllerInstances: Map<RpcController, any>;
26
- protected _connections: amqplib.Connection[];
26
+ protected _connections: amqplib.ChannelModel[];
27
27
  protected _status: RabbitmqAdapter.Status;
28
28
  readonly protocol: OpraSchema.Transport;
29
29
  readonly platform = "rabbitmq";