diff --git a/diagnostic/server.js b/diagnostic/server.js index 71a6898..34968a6 100644 --- a/diagnostic/server.js +++ b/diagnostic/server.js @@ -1246,7 +1246,7 @@ function connectRVS(forcePlain) { }); } -function sendToRVS_withResponse(sendType, sendPayload, expectType, clientWs) { +function sendToRVS_withResponse(sendType, sendPayload, expectType, clientWs, timeoutMs = 15000) { if (!RVS_HOST || !RVS_TOKEN) return; const proto = RVS_TLS === "true" ? "wss" : "ws"; const url = `${proto}://${RVS_HOST}:${RVS_PORT}?token=${RVS_TOKEN}`; @@ -1254,7 +1254,7 @@ function sendToRVS_withResponse(sendType, sendPayload, expectType, clientWs) { const timeout = setTimeout(() => { try { freshWs.close(); } catch (_) {} clientWs.send(JSON.stringify({ type: expectType, payload: { voices: [], error: "Timeout" }, timestamp: Date.now() })); - }, 15000); + }, timeoutMs); freshWs.on("open", () => { freshWs.send(JSON.stringify({ type: sendType, payload: sendPayload, timestamp: Date.now() })); }); @@ -2948,7 +2948,7 @@ wss.on("connection", (ws) => { messages: [{ role: "user", content: String(msg.text || "Sag kurz Hallo.") }], max_tokens: 256, temperature: 0.5, model: msg.model || "", targetInstance: msg.targetInstance || "", - }, "llm_response", ws); + }, "llm_response", ws, 120000); // 2min: erster Modell-Swap laedt das GGUF kalt (mehrere GB) — 15s reichen dann nicht log("info", "llm", `Test-Chat → ${msg.model || "?"} @ ${msg.targetInstance || "(broadcast)"}`); } else if (msg.action === "node_stats_stream_start" || msg.action === "node_stats_stream_stop" || msg.action === "node_stats_history_request" || msg.action === "node_stats_reset") {