Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(lwip): Add early out in
NetworkUDP::parsePacket()
when socket h…
…as no data (espressif#10075) * fix(lwip): Add early out in `NetworkUDP::parsePacket()` when socket has no data Previously, `NetworkUDP::parsePacket()` would take the time to allocate a 1460 byte buffer to call `recvfrom()` with, immediately freeing it if there was no data read. This change has it check if there is available data via `ioctl()` with `FIONREAD` first, saving the allocation and thus significantly increasing performance in no data situations. * fix(lwip): Initialize `len` to ensure it's set before check
- Loading branch information