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/cjs/index.node.js
CHANGED
|
@@ -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
|
-
|
|
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.
|
|
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 ?? {};
|