SHA256
Доработать диагностику запуска UI
This commit is contained in:
@@ -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 закрыто');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user