From 46b437dea020bb76eedc30124e83618b55751f1d Mon Sep 17 00:00:00 2001 From: Roy Buitenhuis Date: Wed, 15 Mar 2023 13:56:40 +0100 Subject: [PATCH] Wait for waker when no data is available on UDP socket. --- embassy-net/src/udp.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/embassy-net/src/udp.rs b/embassy-net/src/udp.rs index 0ee8c6e19..476aef12f 100644 --- a/embassy-net/src/udp.rs +++ b/embassy-net/src/udp.rs @@ -94,8 +94,7 @@ impl<'a> UdpSocket<'a> { Ok(x) => Poll::Ready(Ok(x)), // No data ready Err(udp::RecvError::Exhausted) => { - //s.register_recv_waker(cx.waker()); - cx.waker().wake_by_ref(); + s.register_recv_waker(cx.waker()); Poll::Pending } })