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.
@@ -11890,7 +11890,18 @@ var StableWSConnection = class {
11890
11890
  this._log("_reconnect() - Destroying current WS connection");
11891
11891
  this._destroyCurrentWSConnection();
11892
11892
  if (options.refreshToken) {
11893
- await this.client.tokenManager.loadToken();
11893
+ try {
11894
+ await this.client.tokenManager.loadToken();
11895
+ } catch (error) {
11896
+ this.isHealthy = false;
11897
+ this.consecutiveFailures += 1;
11898
+ this._log("_reconnect() - Failed to refresh the token", { error }, "warn");
11899
+ if (!this.isDisconnected) {
11900
+ this._log("_reconnect() - Going to try to reload token and reconnect");
11901
+ this._reconnect({ refreshToken: true });
11902
+ }
11903
+ return;
11904
+ }
11894
11905
  if (this.isConnecting || this.isHealthy) {
11895
11906
  this._log("_reconnect() - Abort (4) since already connecting or healthy");
11896
11907
  return;
@@ -15305,7 +15316,7 @@ var StreamChat = class _StreamChat {
15305
15316
  return this.userAgent;
15306
15317
  }
15307
15318
  if (!this.cachedUserAgent) {
15308
- const version = "9.54.3";
15319
+ const version = "9.54.4";
15309
15320
  const { name: sdkName, version: sdkVersion } = this.sdkIdentifier ?? {};
15310
15321
  const { name: appName, version: appVersion } = this.appIdentifier ?? {};
15311
15322
  const { os, model: deviceModel } = this.deviceIdentifier ?? {};