fix: optimize async handler usage in singleton checks and resource initialization #4576, #4590, #4609

This commit is contained in:
Tunglies
2025-09-02 13:37:05 +08:00
parent 45ddb15d56
commit d2b38a8a3c
4 changed files with 6 additions and 13 deletions

View File

@@ -44,7 +44,7 @@ pub async fn check_singleton() -> Result<()> {
pub fn embed_server() {
let port = IVerge::get_singleton_port();
AsyncHandler::spawn_blocking(move || async move {
AsyncHandler::spawn(move || async move {
let visible = warp::path!("commands" / "visible").and_then(|| async {
Ok::<_, warp::Rejection>(warp::reply::with_status(
"ok".to_string(),