fix(proxy): add missing clientSocket error handler in CONNECT tunnel … · openclaw/openclaw@e008bc9
SebTardif
·
2026-05-23
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -298,6 +298,22 @@ export async function startDebugProxyServer(params: {
|
298 | 298 | clientSocket.pipe(upstreamSocket); |
299 | 299 | upstreamSocket.pipe(clientSocket); |
300 | 300 | }); |
| 301 | +clientSocket.on("error", (error) => { |
| 302 | +store.recordEvent({ |
| 303 | +sessionId: params.settings.sessionId, |
| 304 | +ts: Date.now(), |
| 305 | +sourceScope: "openclaw", |
| 306 | +sourceProcess: params.settings.sourceProcess, |
| 307 | +protocol: "connect", |
| 308 | +direction: "local", |
| 309 | +kind: "error", |
| 310 | + flowId, |
| 311 | +host: hostname, |
| 312 | +path: req.url ?? "", |
| 313 | +errorText: error.message, |
| 314 | +}); |
| 315 | +upstreamSocket.destroy(); |
| 316 | +}); |
301 | 317 | upstreamSocket.on("error", (error) => { |
302 | 318 | store.recordEvent({ |
303 | 319 | sessionId: params.settings.sessionId, |
@@ -312,7 +328,7 @@ export async function startDebugProxyServer(params: {
|
312 | 328 | path: req.url ?? "", |
313 | 329 | errorText: error.message, |
314 | 330 | }); |
315 | | -clientSocket.end(); |
| 331 | +clientSocket.destroy(); |
316 | 332 | }); |
317 | 333 | }); |
318 | 334 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。