fix: when use SGLANG_PORT this env,port is str (#4528)
Signed-off-by: rongfu.leng <lenronfu@gmail.com>
This commit is contained in:
1 parent
2e0f94ab79
commit
f9970bd1af
1 file changed
+1
@@ -1602,6 +1602,7 @@ def get_ip() -> str:
|
||||
def get_open_port() -> int:
|
||||
port = os.getenv("SGLANG_PORT")
|
||||
if port is not None:
|
||||
port = int(port)
|
||||
while True:
|
||||
try:
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
||||
|
||||
Reference in new issue
Block a user