Skip to content

Commit

Permalink
Fix forgotten ref to async-io
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Nov 3, 2024
1 parent f904689 commit e30b4e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion edge-nal-std/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ impl TcpAccept for TcpAcceptor {
match self.0.as_ref().accept() {
Ok((socket, _)) => break Ok((socket.peer_addr()?, TcpSocket(Async::new(socket)?))),
Err(err) if err.kind() == io::ErrorKind::WouldBlock => {
async_io::Timer::after(core::time::Duration::from_millis(20)).await;
#[cfg(not(feature = "async-io-mini"))]
use async_io::Timer;
#[cfg(feature = "async-io-mini")]
use async_io_mini::Timer;

Timer::after(core::time::Duration::from_millis(20)).await;
}
Err(err) => break Err(err),
}
Expand Down
3 changes: 2 additions & 1 deletion edge-nal/src/timeout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ where
{
type Error = WithTimeoutError<T::Error>;

type Socket<'a> = WithTimeout<T::Socket<'a>>
type Socket<'a>
= WithTimeout<T::Socket<'a>>
where
Self: 'a;

Expand Down

0 comments on commit e30b4e4

Please sign in to comment.