@imqueue/rpc 1.13.11 → 1.13.12

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/IMQClient.js +3 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imqueue/rpc",
3
- "version": "1.13.11",
3
+ "version": "1.13.12",
4
4
  "description": "RPC-like client-service implementation over messaging queue",
5
5
  "keywords": [
6
6
  "redis",
package/src/IMQClient.js CHANGED
@@ -65,12 +65,9 @@ class IMQClient extends events_1.EventEmitter {
65
65
  this.serviceName = serviceName || baseName.replace(/Client$/, '');
66
66
  this.imq = core_1.default.create(this.name, this.options);
67
67
  const terminate = async () => {
68
- try {
69
- await this.destroy();
70
- // istanbul ignore next
71
- setTimeout(() => process.exit(0), 1000);
72
- }
73
- catch (err) { }
68
+ this.destroy().catch(this.logger.error);
69
+ // istanbul ignore next
70
+ setTimeout(() => process.exit(0), core_1.IMQ_SHUTDOWN_TIMEOUT);
74
71
  };
75
72
  SIGNALS.forEach((signal) => process.on(signal, terminate));
76
73
  process.on('exit', terminate);