Update tun_handler.rs
This commit is contained in:
@@ -148,9 +148,10 @@ pub async fn handler_start<F>(
|
|||||||
) where
|
) where
|
||||||
F: FnOnce() + Send + 'static,
|
F: FnOnce() + Send + 'static,
|
||||||
{
|
{
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
use std::os::unix::io::AsRawFd;
|
use std::os::unix::io::AsRawFd;
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
|
use std::os::fd::AsRawFd;
|
||||||
let raw_fd = tun_reader.0.as_raw_fd();
|
let raw_fd = tun_reader.0.as_raw_fd();
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
let _ = status_watch.changed().await;
|
let _ = status_watch.changed().await;
|
||||||
|
|||||||
Reference in New Issue
Block a user