@go-avro/avro-js 0.0.107 → 0.0.108

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.
@@ -454,12 +454,12 @@ export class AvroQueryClient {
454
454
  }
455
455
  setDevice(device) {
456
456
  this.config.device = device;
457
- if (this.socket.connected) {
458
- const auth = this.socket.auth;
459
- if (auth?.token) {
460
- this.socket.auth = this.socketAuth(auth.token);
461
- this.socket.disconnect().connect();
462
- }
457
+ const auth = this.socket.auth;
458
+ if (!auth?.token)
459
+ return;
460
+ this.socket.auth = this.socketAuth(auth.token);
461
+ if (this.socket.connected || this.socket.active) {
462
+ this.socket.disconnect().connect();
463
463
  }
464
464
  }
465
465
  emit(eventName, data) {
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const AVRO_JS_VERSION = "0.0.107";
1
+ export declare const AVRO_JS_VERSION = "0.0.108";
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED by scripts/gen-version.js — do not edit by hand.
2
2
  // Regenerated from package.json by the `prebuild` npm hook.
3
- export const AVRO_JS_VERSION = '0.0.107';
3
+ export const AVRO_JS_VERSION = '0.0.108';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-avro/avro-js",
3
- "version": "0.0.107",
3
+ "version": "0.0.108",
4
4
  "description": "JS client for Avro backend integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",