Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

fix: drop lock once it is no longer needed (#7500)

Michael Bolinf6a7da4ac376
diff --git a/codex-rs/core/src/mcp_connection_manager.rs b/codex-rs/core/src/mcp_connection_manager.rs
index e8c289b573..11a90f77a8 100644
--- a/codex-rs/core/src/mcp_connection_manager.rs
+++ b/codex-rs/core/src/mcp_connection_manager.rs
@@ -151,8 +151,10 @@ impl ElicitationRequestManager {
let server_name = server_name.clone();
async move {
let (tx, rx) = oneshot::channel();
- let mut lock = elicitation_requests.lock().await;
- lock.insert((server_name.clone(), id.clone()), tx);
+ {
+ let mut lock = elicitation_requests.lock().await;
+ lock.insert((server_name.clone(), id.clone()), tx);
+ }
let _ = tx_event
.send(Event {
id: "mcp_elicitation_request".to_string(),