Merge pull request #2678 from fazakis/mac_hack

Mac wakeup workaround
This commit is contained in:
RustDesk 2022-12-30 10:13:43 +08:00 committed by GitHub
commit 2d93c93bc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,6 +194,11 @@ pub async fn create_tcp_connection(
}
}
#[cfg(target_os = "macos")]{
use std::process::Command;
Command::new("/usr/bin/caffeinate").arg("-u").arg("-t 5").spawn().ok();
log::info!("wake up macos");
}
Connection::start(addr, stream, id, Arc::downgrade(&server)).await;
Ok(())
}