Skip to content

Commit 9d8c1fb

Browse files
authored
fix: correct pending_requests instance (#94)
1 parent 9770abc commit 9d8c1fb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

crates/rust-mcp-transport/src/stdio.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,13 +237,11 @@ where
237237

238238
Ok(stream)
239239
} else {
240-
let pending_requests: Arc<Mutex<HashMap<RequestId, tokio::sync::oneshot::Sender<M>>>> =
241-
Arc::new(Mutex::new(HashMap::new()));
242240
let (stream, sender, error_stream) = MCPStream::create(
243241
Box::pin(tokio::io::stdin()),
244242
Mutex::new(Box::pin(tokio::io::stdout())),
245243
IoStream::Writable(Box::pin(tokio::io::stderr())),
246-
pending_requests,
244+
self.pending_requests.clone(),
247245
self.options.timeout,
248246
cancellation_token,
249247
);

0 commit comments

Comments
 (0)