We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b9b0f1 commit dbf1ec4Copy full SHA for dbf1ec4
vllm/utils.py
@@ -628,12 +628,12 @@ def get_open_port() -> int:
628
process. Currently it uses 2 ports.
629
"""
630
if "VLLM_DP_MASTER_PORT" in os.environ:
631
- dp_port = envs.VLLM_DP_MASTER_PORT
+ dp_master_port = envs.VLLM_DP_MASTER_PORT
632
+ reserved_port_range = range(dp_master_port, dp_master_port + 10)
633
while True:
- port = _get_open_port()
634
- if dp_port <= port < dp_port + 10:
635
- continue
636
- return port
+ candidate_port = _get_open_port()
+ if candidate_port not in reserved_port_range:
+ return candidate_port
637
return _get_open_port()
638
639
0 commit comments