Clear active client pointer on socket error closure
Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
1 parent
d3f580dc95
commit
ea0f27dc60
1 file changed
+3
@@ -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;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user