@tdxvolt/volt-client-grpc 0.16.0-beta.6 → 0.16.0-beta.8

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/lib/index.cjs CHANGED
@@ -1975,7 +1975,7 @@ function connectInternal(helloPayload) {
1975
1975
  this._voltConnection.on("error", (err) => {
1976
1976
  // Should auto-reconnect.
1977
1977
  log$1("Volt connection error [%s]", err.message);
1978
- if (err.message === "session invalid") {
1978
+ if (err.message.endsWith("session invalid")) {
1979
1979
  log$1("Volt session invalid - clearing session");
1980
1980
  this._credential.cache.session_id = null;
1981
1981
  this._credential.cache.cert = null;
@@ -1986,6 +1986,8 @@ function connectInternal(helloPayload) {
1986
1986
  onDisconnected();
1987
1987
  this.emit("connected", false);
1988
1988
  }
1989
+
1990
+ this.emit("connectionError", err);
1989
1991
  });
1990
1992
 
1991
1993
  this._voltConnection.on("evt", (evt) => {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.16.0-beta.6",
6
+ "version": "0.16.0-beta.8",
7
7
  "description": "tdx Volt library for nodejs clients",
8
8
  "type": "module",
9
9
  "exports": {
@@ -287,7 +287,7 @@ export function connectInternal(helloPayload) {
287
287
  this._voltConnection.on("error", (err) => {
288
288
  // Should auto-reconnect.
289
289
  log("Volt connection error [%s]", err.message);
290
- if (err.message === "session invalid") {
290
+ if (err.message.endsWith("session invalid")) {
291
291
  log("Volt session invalid - clearing session");
292
292
  this._credential.cache.session_id = null;
293
293
  this._credential.cache.cert = null;
@@ -298,6 +298,8 @@ export function connectInternal(helloPayload) {
298
298
  onDisconnected();
299
299
  this.emit("connected", false);
300
300
  }
301
+
302
+ this.emit("connectionError", err);
301
303
  });
302
304
 
303
305
  this._voltConnection.on("evt", (evt) => {