Skip to content

fix(runtime): cancel pending proxy connections on shutdown - #3516

Draft
wen2zhou wants to merge 1 commit into
aipoch:mainfrom
wen2zhou:codex/fix-pending-proxy-shutdown
Draft

wen2zhou wants to merge 1 commit into
aipoch:mainfrom
wen2zhou:codex/fix-pending-proxy-shutdown

Conversation

@wen2zhou

Copy link
Copy Markdown
Contributor

Pending proxy CONNECT and TLS handshakes have not handed their sockets to Undici, so closing the runtime network can retain these connections. Track their cancellation controllers, abort them during shutdown, and reject operations after the network closes.

The two regression cases stall CONNECT and TLS separately and verify peer EOF and request failure after shutdown. Connection and shutdown deadlines remain unchanged.

Validation: all 7 tests in src/main/runtime-network-node.integration.test.ts, targeted ESLint, formatting and diff checks passed on macOS arm64. This standalone change is separated from #3414; it does not claim to establish the unique cause of an earlier packaged CLI shutdown failure.

@github-actions github-actions Bot added bug Something isn't working size:M 30–99 added/deleted lines, excluding lockfiles labels Oct 12, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:M 30–99 added/deleted lines, excluding lockfiles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant