Разделить среды и закрепить лицензии в HEADER 1.0

This commit is contained in:
AidarKC
2026-12-05 11:42:20 +03:00
parent a64168a748
commit 77c7021aed
89 changed files with 4204 additions and 211 deletions
+3 -1
View File
@@ -83,6 +83,7 @@ export class WsJsonClient {
}
async open() {
if (this.retired) throw new Error('Server connection retired');
if (this.ws && this.ws.readyState === WebSocket.OPEN) return;
if (this.openPromise) return this.openPromise;
if (isMixedContentWs(this.url)) {
@@ -102,6 +103,7 @@ export class WsJsonClient {
this.connectionGeneration += 1;
ws.addEventListener('open', () => {
if (this.retired) { ws.close(); reject(new Error('Server connection retired')); return; }
resolve();
}, { once: true });
@@ -138,7 +140,7 @@ export class WsJsonClient {
if (this.requestGuard) await this.requestGuard(op);
if (this.ws && this.ws.readyState === WebSocket.OPEN) break;
}
if (!this.ws || this.ws.readyState !== WebSocket.OPEN || (existingOnly && !this.isSessionReady())) {
if (this.retired || !this.ws || this.ws.readyState !== WebSocket.OPEN || (existingOnly && !this.isSessionReady())) {
throw new Error(t('remaining.websocket.websocket_connection_closed'));
}
const requestId = createRequestId(op);