forked from espressif/esp-protocols
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:
1 parent
2e28774228
commit
8ca45f34fa
2 files changed
+5
-2
No files matched your search
@@ -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