mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-14 18:21:28 +03: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")]
|
#[cfg(target_os = "macos")]
|
||||||
{
|
{
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
Command::new("/usr/bin/caffeinate")
|
if let Ok(task) = Command::new("/usr/bin/caffeinate")
|
||||||
.arg("-u")
|
.arg("-u")
|
||||||
.arg("-t 5")
|
.arg("-t 5")
|
||||||
.spawn()
|
.spawn()
|
||||||
.ok();
|
{
|
||||||
|
super::CHILD_PROCESS.lock().unwrap().push(task);
|
||||||
|
}
|
||||||
log::info!("wake up macos");
|
log::info!("wake up macos");
|
||||||
}
|
}
|
||||||
Connection::start(addr, stream, id, Arc::downgrade(&server)).await;
|
Connection::start(addr, stream, id, Arc::downgrade(&server)).await;
|
||||||
|
|||||||
Reference in New Issue
Block a user