mirror of
https://github.com/openai/codex.git
synced 2026-11-22 23:00:42 +00:00
Fix thread unloading after disconnect during MCP startup (#50380)
## Why If required MCP startup outlasts the requesting connection's cleanup, the newly created thread can remain loaded without subscribers because its listener is never started. ## What changed Start the thread listener even when the requesting connection has already closed, allowing normal idle unloading to clean up the thread while preserving the `ConnectionClosed` result. ## Testing Add a regression test that disconnects during blocked required MCP startup, then releases startup and verifies a `thread/closed` notification, an empty `thread/loaded/list`, and MCP process exit on Unix. GitOrigin-RevId: 4ad912a82177266316042d806f5faa1713a48fa4
This commit is contained in:
@@ -1911,3 +1911,7 @@ mod message_processor_tracing_tests;
|
||||
#[cfg(test)]
|
||||
#[path = "message_processor_gateway_oauth_tests.rs"]
|
||||
mod gateway_oauth_tests;
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "message_processor_thread_lifecycle_tests.rs"]
|
||||
mod thread_lifecycle_tests;
|
||||
|
||||
Reference in New Issue
Block a user