diff --git a/apps/t3/src/runtimeApiServer.ts b/apps/t3/src/runtimeApiServer.ts index 035aa8bdf9..bafb80d1d0 100644 --- a/apps/t3/src/runtimeApiServer.ts +++ b/apps/t3/src/runtimeApiServer.ts @@ -708,6 +708,9 @@ export async function startRuntimeApiServer( socket.on("error", () => { // Connection-level protocol/socket errors are expected occasionally // (for example oversized client payloads). Keep server process alive. + if (activeClient === socket && socket.readyState !== WebSocket.OPEN) { + activeClient = null; + } }); });