jsgar 1.0.0 → 1.0.1

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/dist/gar.umd.js +4 -1
  2. package/package.json +2 -1
package/dist/gar.umd.js CHANGED
@@ -5384,6 +5384,9 @@
5384
5384
  * Stop the client and terminate all operations.
5385
5385
  */
5386
5386
  async stop() {
5387
+ if (!this.running)
5388
+ return;
5389
+
5387
5390
  this.running = false;
5388
5391
  if (this.heartbeatIntervalId) {
5389
5392
  clearInterval(this.heartbeatIntervalId);
@@ -5493,7 +5496,7 @@
5493
5496
  this.recordMap.delete(`${keyId}:${topicId}`);
5494
5497
  } else if (msgType === 'Logoff') {
5495
5498
  this.log('INFO', 'Received Logoff from server');
5496
- this.running = false;
5499
+ this.stop();
5497
5500
  } else if (msgType === 'Error') {
5498
5501
  this.log('ERROR', `GAR ${message.value.message}`);
5499
5502
  this.exitCode = 1;
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "jsgar",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A Javascript client for the GAR protocol",
5
+ "type": "module",
5
6
  "main": "dist/gar.umd.js",
6
7
  "scripts": {
7
8
  "build": "rollup -c"