mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* bug fix for rxdelay 0
This commit is contained in:
parent
55f14d968f
commit
5824c9a6c0
3 changed files with 7 additions and 0 deletions
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
namespace mesh {
|
||||
|
||||
#define MAX_RX_DELAY_MILLIS 32000 // 32 seconds
|
||||
|
||||
void Dispatcher::begin() {
|
||||
n_sent_flood = n_sent_direct = 0;
|
||||
n_recv_flood = n_recv_direct = 0;
|
||||
|
|
@ -127,6 +129,9 @@ void Dispatcher::checkRecv() {
|
|||
processRecvPacket(pkt); // is below the score delay threshold, so process immediately
|
||||
} else {
|
||||
MESH_DEBUG_PRINTLN("Dispatcher::checkRecv(), score delay is: %d millis", _delay);
|
||||
if (_delay > MAX_RX_DELAY_MILLIS) {
|
||||
_delay = MAX_RX_DELAY_MILLIS;
|
||||
}
|
||||
_mgr->queueInbound(pkt, futureMillis(_delay)); // add to delayed inbound queue
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue