@umimoney/clawdbot-relay-plugin 0.1.19 → 0.1.20

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.
package/dist/index.js CHANGED
@@ -338,6 +338,11 @@ var umiRelayChannel = {
338
338
  return { stop: () => {
339
339
  } };
340
340
  }
341
+ if (relayClient) {
342
+ console.log("[UmiRelay] Closing existing connection before reconnecting...");
343
+ relayClient.disconnect();
344
+ relayClient = null;
345
+ }
341
346
  relayClient = new UmiRelayClient(config);
342
347
  relayClient.onMessage((message) => {
343
348
  if (message.type === "platform:message") {
package/dist/index.mjs CHANGED
@@ -303,6 +303,11 @@ var umiRelayChannel = {
303
303
  return { stop: () => {
304
304
  } };
305
305
  }
306
+ if (relayClient) {
307
+ console.log("[UmiRelay] Closing existing connection before reconnecting...");
308
+ relayClient.disconnect();
309
+ relayClient = null;
310
+ }
306
311
  relayClient = new UmiRelayClient(config);
307
312
  relayClient.onMessage((message) => {
308
313
  if (message.type === "platform:message") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umimoney/clawdbot-relay-plugin",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "description": "Clawdbot plugin for connecting to UMI relay server",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",