Files
orca/src/cli
Trevin Chow 7d409005bc fix(cli): reject RPC promptly when runtime closes socket without responding (#2891)
sendRequest handled the socket's 'error', 'data', and 'connect' events but
never 'close'. A clean peer close (FIN, no error) before a terminal frame —
e.g. the runtime crashing or closing the connection mid-request — left the
promise unsettled until the full timeout fired: 60s by default, up to 10min
once keepalive frames had refreshed the client-side timer.

Add a socket.once('close', ...) that rejects with runtime_unavailable when
the socket closes before a terminal frame settles the request. finish()
already guards against double-settle, so this no-ops on the normal
success/error paths that call socket.end().
2026-05-28 19:48:08 -04:00
..