allow manual connection retry during backoff
Client checks / checks (push) Canceled after 0s
Client dependency and security checks / audit (push) Canceled after 0s

This commit is contained in:
2026-10-25 09:33:08 +01:00
parent b54c7b23fd
commit 092b58cdc2
+3 -1
View File
@@ -116,6 +116,7 @@
let authBusy = false; let authBusy = false;
let connectionNotice = ''; let connectionNotice = '';
let connectionCheckRunning = false; let connectionCheckRunning = false;
let connectionCheckGeneration = 0;
let realtimeState = 'DISCONNECTED'; let realtimeState = 'DISCONNECTED';
let realtimeSocket: WebSocket | undefined; let realtimeSocket: WebSocket | undefined;
let activityEvents: Array<{ event_id: string; event_type: string; occurred_at: string }> = []; let activityEvents: Array<{ event_id: string; event_type: string; occurred_at: string }> = [];
@@ -277,7 +278,7 @@
} }
async function checkServer() { async function checkServer() {
if (connectionCheckRunning) return; const generation = ++connectionCheckGeneration;
connectionCheckRunning = true; connectionCheckRunning = true;
connectionState = 'CONNECTING'; connectionState = 'CONNECTING';
let attempt = 0; let attempt = 0;
@@ -290,6 +291,7 @@
} else { } else {
connectionNotice = 'Connecting to server'; connectionNotice = 'Connecting to server';
} }
if (generation !== connectionCheckGeneration) return;
try { try {
const response = await fetch(`${serverAddress}/api/v1/server/info`); const response = await fetch(`${serverAddress}/api/v1/server/info`);
if (!response.ok) throw new Error(`HTTP ${response.status}`); if (!response.ok) throw new Error(`HTTP ${response.status}`);