fix(openai): keep websocket response timeouts active (#29699)

This commit is contained in:
Luke Parker 2026-05-28 18:28:01 +10:00 • committed by GitHub
commit 913659890d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -159,9 +159,6 @@ export function streamResponsesWebSocket(options: StreamResponsesWebSocketOption
if (!options.idleTimeout) return
if (idleTimer) clearTimeout(idleTimer)
idleTimer = setTimeout(() => invalidate(new ProviderError.ResponseStreamError(message)), options.idleTimeout)
if (typeof idleTimer === "object" && "unref" in idleTimer && typeof idleTimer.unref === "function") {
idleTimer.unref()
}
}
async function onMessage(data: WebSocket.RawData, isBinary: boolean) {