fix(mdns): Fix potential task delete race

Need to wait for the task to be deleted before destroy its stack
This commit is contained in:
David Cermak
2025-03-14 08:57:03 +01:00
parent 2e28774228
commit 8ca45f34fa
2 changed files with 5 additions and 2 deletions

View File

@@ -166,6 +166,8 @@ void vTaskDelete(TaskHandle_t *task)
if (task == NULL) {
pthread_exit(0);
} else {
pthread_cancel((pthread_t)task);
}
void *thread_rval = NULL;
pthread_join((pthread_t)task, &thread_rval);