stream-chat 9.54.3 → 9.54.4

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.
@@ -12082,7 +12082,18 @@ var StableWSConnection = class {
12082
12082
  this._log("_reconnect() - Destroying current WS connection");
12083
12083
  this._destroyCurrentWSConnection();
12084
12084
  if (options.refreshToken) {
12085
- await this.client.tokenManager.loadToken();
12085
+ try {
12086
+ await this.client.tokenManager.loadToken();
12087
+ } catch (error) {
12088
+ this.isHealthy = false;
12089
+ this.consecutiveFailures += 1;
12090
+ this._log("_reconnect() - Failed to refresh the token", { error }, "warn");
12091
+ if (!this.isDisconnected) {
12092
+ this._log("_reconnect() - Going to try to reload token and reconnect");
12093
+ this._reconnect({ refreshToken: true });
12094
+ }
12095
+ return;
12096
+ }
12086
12097
  if (this.isConnecting || this.isHealthy) {
12087
12098
  this._log("_reconnect() - Abort (4) since already connecting or healthy");
12088
12099
  return;
@@ -15497,7 +15508,7 @@ var StreamChat = class _StreamChat {
15497
15508
  return this.userAgent;
15498
15509
  }
15499
15510
  if (!this.cachedUserAgent) {
15500
- const version = "9.54.3";
15511
+ const version = "9.54.4";
15501
15512
  const { name: sdkName, version: sdkVersion } = this.sdkIdentifier ?? {};
15502
15513
  const { name: appName, version: appVersion } = this.appIdentifier ?? {};
15503
15514
  const { os, model: deviceModel } = this.deviceIdentifier ?? {};