mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-10-28 21:21:37 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user