Skip to content
Commit d7d3462d authored by Jonas Norling's avatar Jonas Norling Committed by Jukka Rissanen
Browse files

drivers: eth: native_posix: Don't sleep when there is data to read



Don't sleep 50ms after each received packet, sleep only when there
wasn't anything to receive. Otherwise data could get stuck for a long
time if there was more than 20 packets coming in per second. The
read() call on a TUN/TAP device returns only a single packet per call.

Also remove the call to eth_stats_update_errors_rx() because this else
clause isn't actually a receive error, we're just waiting for more
packets.

Signed-off-by: default avatarJonas Norling <jonas.norling@greeneggs.se>
parent 7e0af9e0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment