Skip to content

Commit

Permalink
fix(mdns): Schedule all queued Tx packets from timer task
Browse files Browse the repository at this point in the history
Partially addresses: espressif/esp-idf#13333
  • Loading branch information
david-cermak committed Mar 20, 2024
1 parent 963b32e commit 75da746
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/mdns/mdns.c
Original file line number Diff line number Diff line change
Expand Up @@ -5191,7 +5191,7 @@ static void _mdns_scheduler_run(void)
MDNS_SERVICE_UNLOCK();
return;
}
if ((int32_t)(p->send_at - (xTaskGetTickCount() * portTICK_PERIOD_MS)) < 0) {
while (p && (int32_t)(p->send_at - (xTaskGetTickCount() * portTICK_PERIOD_MS)) < 0) {
action = (mdns_action_t *)malloc(sizeof(mdns_action_t));
if (action) {
action->type = ACTION_TX_HANDLE;
Expand All @@ -5203,8 +5203,10 @@ static void _mdns_scheduler_run(void)
}
} else {
HOOK_MALLOC_FAILED;
// continue
break;
}
//Find the next unqued packet
p = p->next;
}
MDNS_SERVICE_UNLOCK();
}
Expand Down

0 comments on commit 75da746

Please sign in to comment.