From 897db7b93db51d51b993c350ad78ec27e1523833 Mon Sep 17 00:00:00 2001 From: clark Date: Wed, 8 Jan 2025 21:21:16 +0800 Subject: [PATCH] Replace zmq.asyncio.Context().term() with zmq.asyncio.Context().destroy(linger=0) for immediate termination Signed-off-by: clark --- vllm/entrypoints/disagg_connector.py | 2 +- vllm/entrypoints/launcher.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vllm/entrypoints/disagg_connector.py b/vllm/entrypoints/disagg_connector.py index 9f9e719e63a1a..342f5ce3b6549 100644 --- a/vllm/entrypoints/disagg_connector.py +++ b/vllm/entrypoints/disagg_connector.py @@ -34,7 +34,7 @@ async def lifespan(app: FastAPI): yield ## close zmq context logger.info("term zmqctx") - await app.state.zmqctx.term() + app.state.zmqctx.destroy(linger=0) app = FastAPI(lifespan=lifespan) diff --git a/vllm/entrypoints/launcher.py b/vllm/entrypoints/launcher.py index dd098693cf36d..3872346853da5 100644 --- a/vllm/entrypoints/launcher.py +++ b/vllm/entrypoints/launcher.py @@ -108,7 +108,7 @@ async def serve_zmq(arg, zmq_server_port: int, app: FastAPI) -> None: # We never get here but clean up anyhow clients.close() workers.close() - context.term() + context.destroy(linger=0) def _add_shutdown_handlers(app: FastAPI, server: uvicorn.Server) -> None: """Adds handlers for fatal errors that should crash the server"""