From 841c33198137461ce317a76b9ab27dd09db7b782 Mon Sep 17 00:00:00 2001 From: 21pages Date: Wed, 19 Jun 2024 14:02:13 +0800 Subject: [PATCH] fix sleep duration when receive ipc close (#8410) unit is second Signed-off-by: 21pages --- src/ipc.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ipc.rs b/src/ipc.rs index f73981126..2aff25a15 100644 --- a/src/ipc.rs +++ b/src/ipc.rs @@ -363,7 +363,8 @@ async fn handle(data: Data, stream: &mut Connection) { // below part is for main windows can be reopen during rustdesk installation and installing service from UI // this make new ipc server (domain socket) can be created. std::fs::remove_file(&Config::ipc_path("")).ok(); - hbb_common::sleep((crate::platform::SERVICE_INTERVAL * 2) as f32).await; + hbb_common::sleep((crate::platform::SERVICE_INTERVAL * 2) as f32 / 1000.0) + .await; crate::run_me::<&str>(vec![]).ok(); } std::process::exit(-1); // to make sure --server luauchagent process can restart because SuccessfulExit used