π The fast, Pythonic way to build MCP servers and clients.
Update server.py
Jeremiah Lowin396207f17771
diff --git a/src/fastmcp/server/server.py b/src/fastmcp/server/server.pyindex e0b96e90a..1de7dd908 100644--- a/src/fastmcp/server/server.py+++ b/src/fastmcp/server/server.py@@ -830,6 +830,8 @@ class FastMCP(Generic[LifespanResultT]):) -> None:"""Run the server using SSE transport."""uvicorn_config = uvicorn_config or {}+ # the SSE app hangs even when a signal is sent, so we disable the timeout to make it possible to close immediately.+ # see https://github.com/jlowin/fastmcp/issues/296uvicorn_config.setdefault("timeout_graceful_shutdown", 0)app = RequestMiddleware(self.sse_app())