From adf0226641e0eb3b96084f0d1b0e64f19afa4612 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Wed, 19 Jun 2024 19:10:44 +0800 Subject: [PATCH] fix ci and make macos service time check more aggressive --- src/platform/linux.rs | 2 +- src/platform/macos.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/linux.rs b/src/platform/linux.rs index 7e8c158805da..0810bb2460ba 100644 --- a/src/platform/linux.rs +++ b/src/platform/linux.rs @@ -1395,8 +1395,8 @@ pub fn install_service() -> bool { "{cp} systemctl enable {app_name}; systemctl stop {app_name}; systemctl start {app_name};" )) { Config::set_option("stop-service".into(), "Y".into()); - return true; } + true } fn check_if_stop_service() { diff --git a/src/platform/macos.rs b/src/platform/macos.rs index ca3f0f75df3a..923d7d762984 100644 --- a/src/platform/macos.rs +++ b/src/platform/macos.rs @@ -516,7 +516,7 @@ pub fn start_os_service() { server = get_server_start_time(&mut sys, &path); } if let Some((start_time, pid)) = server { - if my_start_time <= start_time { + if my_start_time <= start_time + 1 { log::error!( "Agent start later, {my_start_time} vs {start_time}, will restart --service to make delegate work", );