diff --git a/package-lock.json b/package-lock.json index d65b58e..3c5020a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ulms/api-clients", - "version": "7.23.1", + "version": "7.23.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ulms/api-clients", - "version": "7.23.1", + "version": "7.23.2", "license": "MIT", "dependencies": { "axios": "1.6.2", diff --git a/package.json b/package.json index 8b4cd5b..594e00f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ulms/api-clients", - "version": "7.23.1", + "version": "7.23.2", "description": "JavaScript API clients for ULMS platform", "keywords": [], "homepage": "https://github.com/foxford/ulms-api-clients-js#readme", diff --git a/src/nats-manager.js b/src/nats-manager.js index ca8b1af..a0eb1f2 100644 --- a/src/nats-manager.js +++ b/src/nats-manager.js @@ -49,6 +49,11 @@ class NatsManager { } async start(classId, name, accountLabel) { + if (this.id) { + // has previous connection, close it + await this.stop() + } + const rid = generateRandomId() this.id = rid