[BugFix] make sure socket close (#15875)
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
parent
7acd539cd7
commit
93491aefc7
@ -1098,8 +1098,9 @@ async def run_server(args, **uvicorn_kwargs) -> None:
|
||||
)
|
||||
|
||||
# NB: Await server shutdown only after the backend context is exited
|
||||
try:
|
||||
await shutdown_task
|
||||
|
||||
finally:
|
||||
sock.close()
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user