diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-01-19 13:30:51 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-01-19 14:44:01 +0100 |
| commit | 570ffab6703083f4e7f08a982afbf1c6de93b801 (patch) | |
| tree | 769c560d15b00530e7ebadaf8cb4bed456b81153 /embassy-net | |
| parent | 8f4fae9b36f017a8ab65491ef49b72499a9486dc (diff) | |
net: poll returning false is not an error. No need to repoll.
Diffstat (limited to 'embassy-net')
| -rw-r--r-- | embassy-net/src/lib.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/embassy-net/src/lib.rs b/embassy-net/src/lib.rs index c419ec1f9..b8e766b8b 100644 --- a/embassy-net/src/lib.rs +++ b/embassy-net/src/lib.rs | |||
| @@ -288,11 +288,7 @@ impl<D: Driver + 'static> Inner<D> { | |||
| 288 | cx: Some(cx), | 288 | cx: Some(cx), |
| 289 | inner: &mut self.device, | 289 | inner: &mut self.device, |
| 290 | }; | 290 | }; |
| 291 | if !s.iface.poll(timestamp, &mut smoldev, &mut s.sockets) { | 291 | s.iface.poll(timestamp, &mut smoldev, &mut s.sockets); |
| 292 | // If poll() returns error, it may not be done yet, so poll again later. | ||
| 293 | cx.waker().wake_by_ref(); | ||
| 294 | return; | ||
| 295 | } | ||
| 296 | 292 | ||
| 297 | // Update link up | 293 | // Update link up |
| 298 | let old_link_up = self.link_up; | 294 | let old_link_up = self.link_up; |
