Describe the bug
While using streamable-http transport. The SseBody donnot handle the signal of gracefully shutdown, thus, blocking the shutdown process until client disconnect.
To Reproduce
- start the server
RUST_LOG=trace cargo run --example servers_counter_streamhtt
-
create a client connection to server via @modelcontextprotocol/inspector
-
press CTRL + C to trigger server exits
I noted the sse transport has similar issue, but I don't dig it deep.
Expected behavior
While trigger cancelled, the server will exits immediately.
Logs
If applicable, add logs to help explain your problem.
Additional context
Add any other context about the problem here.