mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-13 05:20:28 +08:00
refactor: improve service manager initialization by reducing lock duration
This commit is contained in:
parent
0f41f1bc8d
commit
e6a88cf9c9
@ -178,9 +178,11 @@ pub(super) async fn init_service_manager() {
|
||||
if !is_service_ipc_path_exists() {
|
||||
return;
|
||||
}
|
||||
if SERVICE_MANAGER.lock().await.init().await.is_ok() {
|
||||
logging_error!(Type::Setup, SERVICE_MANAGER.lock().await.refresh().await);
|
||||
let mut manager = SERVICE_MANAGER.lock().await;
|
||||
if manager.init().await.is_ok() {
|
||||
logging_error!(Type::Setup, manager.refresh().await);
|
||||
}
|
||||
drop(manager);
|
||||
}
|
||||
|
||||
pub(super) async fn init_core_manager() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user