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.
@@ -12113,7 +12113,18 @@ var StableWSConnection = class {
12113
12113
  this._log("_reconnect() - Destroying current WS connection");
12114
12114
  this._destroyCurrentWSConnection();
12115
12115
  if (options.refreshToken) {
12116
- await this.client.tokenManager.loadToken();
12116
+ try {
12117
+ await this.client.tokenManager.loadToken();
12118
+ } catch (error) {
12119
+ this.isHealthy = false;
12120
+ this.consecutiveFailures += 1;
12121
+ this._log("_reconnect() - Failed to refresh the token", { error }, "warn");
12122
+ if (!this.isDisconnected) {
12123
+ this._log("_reconnect() - Going to try to reload token and reconnect");
12124
+ this._reconnect({ refreshToken: true });
12125
+ }
12126
+ return;
12127
+ }
12117
12128
  if (this.isConnecting || this.isHealthy) {
12118
12129
  this._log("_reconnect() - Abort (4) since already connecting or healthy");
12119
12130
  return;
@@ -15528,7 +15539,7 @@ var StreamChat = class _StreamChat {
15528
15539
  return this.userAgent;
15529
15540
  }
15530
15541
  if (!this.cachedUserAgent) {
15531
- const version = "9.54.3";
15542
+ const version = "9.54.4";
15532
15543
  const { name: sdkName, version: sdkVersion } = this.sdkIdentifier ?? {};
15533
15544
  const { name: appName, version: appVersion } = this.appIdentifier ?? {};
15534
15545
  const { os, model: deviceModel } = this.deviceIdentifier ?? {};