net: poll returning false is not an error. No need to repoll.

This commit is contained in:
Dario Nieuwenhuis 2023-01-19 13:30:51 +01:00
parent 8f4fae9b36
commit 570ffab670

View File

@ -288,11 +288,7 @@ impl<D: Driver + 'static> Inner<D> {
cx: Some(cx),
inner: &mut self.device,
};
if !s.iface.poll(timestamp, &mut smoldev, &mut s.sockets) {
// If poll() returns error, it may not be done yet, so poll again later.
cx.waker().wake_by_ref();
return;
}
s.iface.poll(timestamp, &mut smoldev, &mut s.sockets);
// Update link up
let old_link_up = self.link_up;