Update smoltcp.

This commit is contained in:
Dario Nieuwenhuis
2023-06-26 01:59:25 +02:00
parent d8c70c5c3e
commit 64cba950e5
4 changed files with 18 additions and 9 deletions

View File

@ -104,7 +104,7 @@ impl<'a> UdpSocket<'a> {
pub async fn recv_from(&self, buf: &mut [u8]) -> Result<(usize, IpEndpoint), Error> {
poll_fn(move |cx| {
self.with_mut(|s, _| match s.recv_slice(buf) {
Ok(x) => Poll::Ready(Ok(x)),
Ok((n, meta)) => Poll::Ready(Ok((n, meta.endpoint))),
// No data ready
Err(udp::RecvError::Exhausted) => {
s.register_recv_waker(cx.waker());