Files
openclaw/src/proxy-capture
Sebastien Tardif e008bc92c3 fix(proxy): add missing clientSocket error handler in CONNECT tunnel (#82444)
The CONNECT handler pipes clientSocket and upstreamSocket together but
only registers an error handler on upstreamSocket. If the client
disconnects abruptly (ECONNRESET), the unhandled error event on
clientSocket causes the Node process to crash.

Add a clientSocket error handler that logs the event and destroys the
upstream socket. Also change clientSocket.end() to clientSocket.destroy()
in the upstream error handler since destroy() is more appropriate for
error cleanup of piped sockets.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
2026-05-22 22:33:46 +01:00
..