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
1775b963
Unverified
Commit
1775b963
authored
Jan 03, 2025
by
Mick
Committed by
GitHub
Jan 02, 2025
Browse files
[Fix] fix incorrectly overwriting the port specified in ServerArgs (#2714)
parent
dd2e2d27
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
python/sglang/srt/server.py
python/sglang/srt/server.py
+1
-2
No files found.
python/sglang/srt/server.py
View file @
1775b963
...
@@ -917,10 +917,9 @@ class Runtime:
...
@@ -917,10 +917,9 @@ class Runtime:
atexit
.
register
(
self
.
shutdown
)
atexit
.
register
(
self
.
shutdown
)
# Pre-allocate ports
# Pre-allocate ports
for
port
in
range
(
10000
,
40000
):
for
port
in
range
(
self
.
server_args
.
port
,
40000
):
if
is_port_available
(
port
):
if
is_port_available
(
port
):
break
break
port
+=
1
self
.
server_args
.
port
=
port
self
.
server_args
.
port
=
port
self
.
url
=
self
.
server_args
.
url
()
self
.
url
=
self
.
server_args
.
url
()
...
...
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