Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
f9970bd1
Unverified
Commit
f9970bd1
authored
Mar 28, 2025
by
rongfu.leng
Committed by
GitHub
Mar 27, 2025
Browse files
fix: when use SGLANG_PORT this env,port is str (#4528)
Signed-off-by:
rongfu.leng
<
lenronfu@gmail.com
>
parent
2e0f94ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
python/sglang/srt/utils.py
python/sglang/srt/utils.py
+1
-0
No files found.
python/sglang/srt/utils.py
View file @
f9970bd1
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment