fix: fix addrInUse at dev & cursor-point

This commit is contained in:
2025-04-22 01:12:01 +08:00
parent 08946059ad
commit e64086b7cf
8 changed files with 50 additions and 32 deletions

View File

@@ -78,12 +78,25 @@ impl App {
.await;
};
#[cfg(all(unix, debug_assertions))]
let quit = async {
signal::unix::signal(signal::unix::SignalKind::quit())
.expect("Failed to install SIGQUIT handler")
.recv()
.await;
println!("Received SIGQUIT");
};
#[cfg(not(unix))]
let terminate = std::future::pending::<()>();
#[cfg(all(not(unix), debug_assertions))]
let quit = std::future::pending::<()>();
tokio::select! {
() = ctrl_c => {},
() = terminate => {},
() = quit => {},
}
}
}