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.
- package/dist/cjs/index.browser.js +13 -2
- package/dist/cjs/index.browser.js.map +2 -2
- package/dist/cjs/index.node.js +13 -2
- package/dist/cjs/index.node.js.map +2 -2
- package/dist/esm/index.mjs +13 -2
- package/dist/esm/index.mjs.map +2 -2
- package/package.json +1 -1
- package/src/connection.ts +15 -1
package/dist/esm/index.mjs
CHANGED
|
@@ -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
|
-
|
|
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.
|
|
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 ?? {};
|