Skip to content

Commit 7678ad1

Browse files
hmellorminpeter
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> Signed-off-by: minpeter <kali2005611@gmail.com>
1 parent 2a95104 commit 7678ad1

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)