File tree Expand file tree Collapse file tree 5 files changed +13
-4
lines changed
common_components/linux_compat/freertos Expand file tree Collapse file tree 5 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,8 @@ void vTaskDelete(TaskHandle_t *task)
166166
167167 if (task == NULL ) {
168168 pthread_exit (0 );
169+ } else {
170+ pthread_cancel ((pthread_t )task );
169171 }
170172 void * thread_rval = NULL ;
171173 pthread_join ((pthread_t )task , & thread_rval );
Original file line number Diff line number Diff line change @@ -3,6 +3,6 @@ commitizen:
33 bump_message : ' bump(mdns): $current_version -> $new_version'
44 pre_bump_hooks : python ../../ci/changelog.py mdns
55 tag_format : mdns-v$version
6- version : 1.8.0
6+ version : 1.8.1
77 version_files :
88 - idf_component.yml
Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## [ 1.8.1] ( https://github.com/espressif/esp-protocols/commits/mdns-v1.8.1 )
4+
5+ ### Bug Fixes
6+
7+ - Fix potential task delete race ([ 8ca45f34] ( https://github.com/espressif/esp-protocols/commit/8ca45f34 ) )
8+
39## [ 1.8.0] ( https://github.com/espressif/esp-protocols/commits/mdns-v1.8.0 )
410
511### Features
Original file line number Diff line number Diff line change 1- version : " 1.8.0 "
1+ version : " 1.8.1 "
22description : " Multicast UDP service used to provide local network service and host discovery."
33url : " https://github.com/espressif/esp-protocols/tree/master/components/mdns"
44issues : " https://github.com/espressif/esp-protocols/issues"
Original file line number Diff line number Diff line change @@ -5427,7 +5427,7 @@ static void _mdns_service_task(void *pvParameters)
54275427 }
54285428 }
54295429 _mdns_service_task_handle = NULL ;
5430- vTaskDelete ( NULL );
5430+ vTaskDelay ( portMAX_DELAY );
54315431}
54325432
54335433static void _mdns_timer_cb (void * arg )
@@ -5532,16 +5532,17 @@ static esp_err_t _mdns_service_task_stop(void)
55325532{
55335533 _mdns_stop_timer ();
55345534 if (_mdns_service_task_handle ) {
5535+ TaskHandle_t task_handle = _mdns_service_task_handle ;
55355536 mdns_action_t action ;
55365537 mdns_action_t * a = & action ;
55375538 action .type = ACTION_TASK_STOP ;
55385539 if (xQueueSend (_mdns_server -> action_queue , & a , (TickType_t )0 ) != pdPASS ) {
5539- vTaskDelete (_mdns_service_task_handle );
55405540 _mdns_service_task_handle = NULL ;
55415541 }
55425542 while (_mdns_service_task_handle ) {
55435543 vTaskDelay (10 / portTICK_PERIOD_MS );
55445544 }
5545+ vTaskDelete (task_handle );
55455546 }
55465547 vSemaphoreDelete (_mdns_service_semaphore );
55475548 _mdns_service_semaphore = NULL ;
You can’t perform that action at this time.
0 commit comments