We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ae876b commit e898da2Copy full SHA for e898da2
src/packet/future.rs
@@ -51,7 +51,7 @@ pub enum InterfaceReady {
51
No,
52
}
53
54
-async fn poll_ready(
+fn poll_ready(
55
fd: std::os::unix::io::RawFd,
56
timeout: Option<Duration>,
57
) -> Result<InterfaceReady, Error> {
@@ -76,7 +76,8 @@ async fn poll_ready(
76
impl DispatchArgs {
77
async fn poll(&self, timeout: Option<Duration>) -> Result<InterfaceReady, Error> {
78
trace!("Polling FD with timeout {:?}", timeout);
79
- smol::block_on(poll_ready(self.fd.clone(), timeout))
+ let fd = self.fd.clone();
80
+ smol::unblock(move || poll_ready(fd, timeout)).await
81
82
83
0 commit comments