mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-02-17 22:11:30 +08:00
fix: macos, defunct process (#12315)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -231,11 +231,13 @@ pub async fn create_tcp_connection(
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
use std::process::Command;
|
||||
Command::new("/usr/bin/caffeinate")
|
||||
if let Ok(task) = Command::new("/usr/bin/caffeinate")
|
||||
.arg("-u")
|
||||
.arg("-t 5")
|
||||
.spawn()
|
||||
.ok();
|
||||
{
|
||||
super::CHILD_PROCESS.lock().unwrap().push(task);
|
||||
}
|
||||
log::info!("wake up macos");
|
||||
}
|
||||
Connection::start(addr, stream, id, Arc::downgrade(&server)).await;
|
||||
|
||||
Reference in New Issue
Block a user