Skip to content

Commit a5954dd

Browse files
authored
Merge pull request #533 from david-cermak/fix/mdns_process_tx_packets
fix(mdns): Schedule all queued Tx packets from timer task
2 parents b9c675b + d4e693e commit a5954dd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

components/mdns/mdns.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5191,7 +5191,7 @@ static void _mdns_scheduler_run(void)
51915191
MDNS_SERVICE_UNLOCK();
51925192
return;
51935193
}
5194-
if ((int32_t)(p->send_at - (xTaskGetTickCount() * portTICK_PERIOD_MS)) < 0) {
5194+
while (p && (int32_t)(p->send_at - (xTaskGetTickCount() * portTICK_PERIOD_MS)) < 0) {
51955195
action = (mdns_action_t *)malloc(sizeof(mdns_action_t));
51965196
if (action) {
51975197
action->type = ACTION_TX_HANDLE;
@@ -5203,8 +5203,10 @@ static void _mdns_scheduler_run(void)
52035203
}
52045204
} else {
52055205
HOOK_MALLOC_FAILED;
5206-
// continue
5206+
break;
52075207
}
5208+
//Find the next unqued packet
5209+
p = p->next;
52085210
}
52095211
MDNS_SERVICE_UNLOCK();
52105212
}

0 commit comments

Comments
 (0)