@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 93491aefc7
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 15, 16:00 UTC

[BugFix] make sure socket close (#15875)

Signed-off-by: yihong0618 <zouzou0208@gmail.com>

yihong committed Apr 2, 2025 at 04:10 UTC 93491aefc7b98770e0a361859eb15660138a3abb
1 file changed +4 -3
vllm/entrypoints/openai/api_server.py
+4 -3
@@ -1098,9 +1098,10 @@ async def run_server(args, **uvicorn_kwargs) -> None:
1098 )
1099
1100 # NB: Await server shutdown only after the backend context is exited
1101 - await shutdown_task
1102 -
1103 - sock.close()
1101 + try:
1102 + await shutdown_task
1103 + finally:
1104 + sock.close()
1105
1106
1107 if __name__ == "__main__":