-
Notifications
You must be signed in to change notification settings - Fork 1.2k
FastMCP server with SSE transport fails to shut down on a signal #514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think uvicorn is waiting for close opened sse connection. Can anyone help? |
It’s unclear if there’s a manual way to disconnect from the session. The session gets created when you attempt to connect using an MCP client, and even the MCP Inspector doesn’t terminate the session when "Disconnect" is clicked. |
deleted previous message as thought it was raised on my project! - i have been scratching my head on this one...! would be good to get fixed. |
... I would also like to add that if the MCP server has at least one real established connection, it fails to shut down even with forced Ctrl-C. The only way is to kill the process. |
I'm experiencing the same issue. Initially, I suspected it might be caused by the Auto Forward Ports feature of the VS Code Remote plugin. However, after disabling automatic port forwarding, the problem persists. |
so this issue has been resolved? |
Fixed in #586 |
A very simple server fails to shut down on a signal if it processed at least one request:
The expected behaviour would be:
Here is the code for both the server and the client.
What do I miss?
the server
and the client
The text was updated successfully, but these errors were encountered: