Skip to content

Commit 709595d

Browse files
hmellorlk-chen
authored andcommitted
Ensure that pid passed to kill_process_tree is int for mypy (vllm-project#17051)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
1 parent ee0fca2 commit 709595d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vllm/v1/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ def shutdown(proc: Process, input_path: str, output_path: str):
134134
proc.terminate()
135135
proc.join(5)
136136

137-
if proc.is_alive():
138-
kill_process_tree(proc.pid)
137+
if proc.is_alive() and (pid := proc.pid) is not None:
138+
kill_process_tree(pid)
139139

140140
# Remove zmq ipc socket files.
141141
ipc_sockets = [output_path, input_path]

0 commit comments

Comments
 (0)