docs(mcp): document replacement invariants

Co-authored-by: Codex noreply@openai.com
This commit is contained in:
viyatb-oai
2026-06-25 09:59:04 -07:00
co-authored by Codex noreply@openai.com
parent 75b188502d
commit b32ef8a9de
3 changed files with 9 additions and 1 deletions
+3
View File
@@ -473,6 +473,9 @@ impl Session {
.services
.mcp_connection_manager
.swap(Arc::clone(&replacement_manager));
// Publish first, then transfer cancellation ownership while both manager
// snapshots are still held here. Dropping an uncommitted replacement
// cancels only the client it prepared.
replacement_manager.take_cancellation_ownership_from(&superseded_manager);
drop(current_manager);