Update tun_handler.rs

This commit is contained in:
lbl8603
2023-02-07 17:43:38 +08:00
committed by GitHub
parent b3abb175c1
commit 80109fd8aa
+4 -3
View File
@@ -148,9 +148,10 @@ pub async fn handler_start<F>(
) where
F: FnOnce() + Send + 'static,
{
#[cfg(target_os = "linux")]
use std::os::unix::io::AsRawFd;
#[cfg(target_os = "macos")]
#[cfg(target_os = "linux")]
use std::os::unix::io::AsRawFd;
#[cfg(target_os = "macos")]
use std::os::fd::AsRawFd;
let raw_fd = tun_reader.0.as_raw_fd();
tokio::spawn(async move {
let _ = status_watch.changed().await;