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
e3f9b548
Unverified
Commit
e3f9b548
authored
Jun 29, 2025
by
Simo Lin
Committed by
GitHub
Jun 29, 2025
Browse files
[bugfix] fix runtime dropping panic in editable (#7628)
parent
b3cff365
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
sgl-router/src/lib.rs
sgl-router/src/lib.rs
+7
-3
No files found.
sgl-router/src/lib.rs
View file @
e3f9b548
...
...
@@ -272,7 +272,12 @@ impl Router {
.unwrap_or_else
(||
"127.0.0.1"
.to_string
()),
});
actix_web
::
rt
::
System
::
new
()
.block_on
(
async
move
{
// Use tokio runtime instead of actix-web System for better compatibility
let
runtime
=
tokio
::
runtime
::
Runtime
::
new
()
.map_err
(|
e
|
pyo3
::
exceptions
::
PyRuntimeError
::
new_err
(
e
.to_string
()))
?
;
// Block on the async startup function
runtime
.block_on
(
async
move
{
server
::
startup
(
server
::
ServerConfig
{
host
:
self
.host
.clone
(),
port
:
self
.port
,
...
...
@@ -286,8 +291,7 @@ impl Router {
request_timeout_secs
:
self
.request_timeout_secs
,
})
.await
.map_err
(|
e
|
pyo3
::
exceptions
::
PyRuntimeError
::
new_err
(
e
.to_string
()))
?
;
Ok
(())
.map_err
(|
e
|
pyo3
::
exceptions
::
PyRuntimeError
::
new_err
(
e
.to_string
()))
})
}
}
...
...
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