Unverified Commit f9970bd1 authored by rongfu.leng's avatar rongfu.leng Committed by GitHub
Browse files

fix: when use SGLANG_PORT this env,port is str (#4528)


Signed-off-by: default avatarrongfu.leng <lenronfu@gmail.com>
parent 2e0f94ab
...@@ -1602,6 +1602,7 @@ def get_ip() -> str: ...@@ -1602,6 +1602,7 @@ def get_ip() -> str:
def get_open_port() -> int: def get_open_port() -> int:
port = os.getenv("SGLANG_PORT") port = os.getenv("SGLANG_PORT")
if port is not None: if port is not None:
port = int(port)
while True: while True:
try: try:
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment