MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / scheduleWebSocketReconnect

Function scheduleWebSocketReconnect

static/js/app.js:1258–1271  ·  view source on GitHub ↗
(taskUuid)

Source from the content-addressed store, hash-verified

1256}
1257
1258function scheduleWebSocketReconnect(taskUuid) {
1259 if (!taskUuid || wsReconnectTimer || wsManualClose || taskCompleted || taskFinalStatus !== null || activeTaskUuid !== taskUuid) {
1260 return;
1261 }
1262
1263 wsReconnectAttempts += 1;
1264 const delay = getReconnectDelay(wsReconnectAttempts);
1265 addLog('warning', `[系统] WebSocket 已断开,${delay / 1000} 秒后尝试重连任务监控...`);
1266
1267 wsReconnectTimer = setTimeout(() => {
1268 wsReconnectTimer = null;
1269 connectWebSocket(taskUuid);
1270 }, delay);
1271}
1272
1273function scheduleBatchWebSocketReconnect(batchId) {
1274 if (!batchId || batchWsReconnectTimer || batchWsManualClose || batchCompleted || batchFinalStatus !== null || activeBatchId !== batchId) {

Callers 1

connectWebSocketFunction · 0.85

Calls 3

getReconnectDelayFunction · 0.85
addLogFunction · 0.85
connectWebSocketFunction · 0.85

Tested by

no test coverage detected