We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 93634fc commit 17d7ab9Copy full SHA for 17d7ab9
1 file changed
crates/rmcp/src/transport/streamable_http_server/tower.rs
@@ -602,8 +602,13 @@ where
602
// JSON-direct mode: await the single response and return as
603
// application/json, eliminating SSE framing overhead.
604
// Allowed by MCP Streamable HTTP spec (2025-06-18).
605
- match receiver.recv().await {
+ let cancel = self.config.cancellation_token.child_token();
606
+ match tokio::select! {
607
+ res = receiver.recv() => res,
608
+ _ = cancel.cancelled() => None,
609
+ } {
610
Some(message) => {
611
+ tracing::info!(?message);
612
let body = serde_json::to_vec(&message).map_err(|e| {
613
internal_error_response("serialize json response")(e)
614
})?;
0 commit comments