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
zhaoyu6
sglang
Commits
b1706469
"vscode:/vscode.git/clone" did not exist on "add2845ae6e42040deaefde661a4275a5a2e5836"
Unverified
Commit
b1706469
authored
Jan 11, 2025
by
TianYu GUO
Committed by
GitHub
Jan 10, 2025
Browse files
Fix port number overflow (#2826)
parent
5413ec2b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
python/sglang/srt/server_args.py
python/sglang/srt/server_args.py
+4
-1
python/sglang/srt/utils.py
python/sglang/srt/utils.py
+2
-0
No files found.
python/sglang/srt/server_args.py
View file @
b1706469
...
...
@@ -928,7 +928,10 @@ class PortArgs:
while
True
:
if
is_port_available
(
port
):
break
port
+=
42
if
port
<
60000
:
port
+=
42
else
:
port
-=
43
return
PortArgs
(
tokenizer_ipc_name
=
tempfile
.
NamedTemporaryFile
(
delete
=
False
).
name
,
...
...
python/sglang/srt/utils.py
View file @
b1706469
...
...
@@ -335,6 +335,8 @@ def is_port_available(port):
return
True
except
socket
.
error
:
return
False
except
OverflowError
:
return
False
def
decode_video_base64
(
video_base64
):
...
...
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