Wait for waker when no data is available on UDP socket.
This commit is contained in:
parent
e9a161b462
commit
46b437dea0
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue