Доработать диагностику запуска UI

This commit is contained in:
2026-10-23 11:22:33 +03:00
parent df0e9cef9b
commit dbac798e7f
8 changed files with 1349 additions and 24 deletions
+4
View File
@@ -79,14 +79,17 @@ export class WsJsonClient {
}
this.openPromise = new Promise((resolve, reject) => {
window.__SHINE_STAGE0__?.mark('ws_attempt');
const ws = new WebSocket(this.url);
this.ws = ws;
ws.addEventListener('open', () => {
window.__SHINE_STAGE0__?.mark('ws_open');
resolve();
}, { once: true });
ws.addEventListener('error', () => {
window.__SHINE_STAGE0__?.mark('ws_error');
captureClientError({
kind: 'ws_open_error',
message: `Failed to connect WebSocket ${this.url}`,
@@ -96,6 +99,7 @@ export class WsJsonClient {
}, { once: true });
ws.addEventListener('close', () => {
window.__SHINE_STAGE0__?.mark('ws_close');
this.failPending('Соединение WebSocket закрыто');
});