abra-flexi 0.5.2 → 0.5.3
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/index.cjs +11 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +11 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -67164,9 +67164,17 @@ var AFApiSession = class {
|
|
|
67164
67164
|
};
|
|
67165
67165
|
}
|
|
67166
67166
|
_establish(sessionId) {
|
|
67167
|
+
if (this.status === AFSessionStatus.LogingOut) throw new AFError(AFErrorCode.LOGOUT_UNDERWAY, `[AFApiSession] Can't establish while logout attempt is underway.`);
|
|
67168
|
+
if (this.status === AFSessionStatus.LogingIn) return this._loginPromise;
|
|
67169
|
+
this._sessionError = null;
|
|
67170
|
+
this._authSessionId = sessionId;
|
|
67167
67171
|
this._loginPromise = (async () => {
|
|
67168
67172
|
try {
|
|
67169
67173
|
await this._keepaliveTick(true);
|
|
67174
|
+
this._enableKeepalive();
|
|
67175
|
+
} catch (e) {
|
|
67176
|
+
this._authSessionId = null;
|
|
67177
|
+
throw e;
|
|
67170
67178
|
} finally {
|
|
67171
67179
|
this._loginPromise = null;
|
|
67172
67180
|
}
|
|
@@ -67176,7 +67184,9 @@ var AFApiSession = class {
|
|
|
67176
67184
|
_enableKeepalive() {
|
|
67177
67185
|
if (!this._keepAliveIntervalMs) return;
|
|
67178
67186
|
if (this._keepAliveHandler) this._disableKeepalive();
|
|
67179
|
-
this._keepAliveHandler = setInterval(
|
|
67187
|
+
this._keepAliveHandler = setInterval(() => {
|
|
67188
|
+
this._keepaliveTick(false);
|
|
67189
|
+
}, this._keepAliveIntervalMs);
|
|
67180
67190
|
}
|
|
67181
67191
|
_disableKeepalive() {
|
|
67182
67192
|
clearInterval(this._keepAliveHandler);
|