mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
PacketQueue::countBefore() and PacketQueue::get() use unsigned comparison (_schedule_table[j] > now) to check if a packet is scheduled for the future. This breaks when millis() wraps around after ~49.7 days: packets scheduled just before the wrap appear to be in the far future and get stuck in the queue. Use signed subtraction instead, matching the approach already used by Dispatcher::millisHasNowPassed(). This correctly handles the wraparound for time differences up to ~24.8 days in either direction, well beyond the maximum queue delay of 32 seconds. |
||
|---|---|---|
| .. | ||
| helpers | ||
| Dispatcher.cpp | ||
| Dispatcher.h | ||
| Identity.cpp | ||
| Identity.h | ||
| Mesh.cpp | ||
| Mesh.h | ||
| MeshCore.h | ||
| Packet.cpp | ||
| Packet.h | ||
| Utils.cpp | ||
| Utils.h | ||