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)
166
166
167
167
if (task == NULL ) {
168
168
pthread_exit (0 );
169
+ } else {
170
+ pthread_cancel ((pthread_t )task );
169
171
}
170
172
void * thread_rval = NULL ;
171
173
pthread_join ((pthread_t )task , & thread_rval );
Original file line number Diff line number Diff line change @@ -3,6 +3,6 @@ commitizen:
3
3
bump_message : ' bump(mdns): $current_version -> $new_version'
4
4
pre_bump_hooks : python ../../ci/changelog.py mdns
5
5
tag_format : mdns-v$version
6
- version : 1.8.0
6
+ version : 1.8.1
7
7
version_files :
8
8
- idf_component.yml
Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
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
+
3
9
## [ 1.8.0] ( https://github.com/espressif/esp-protocols/commits/mdns-v1.8.0 )
4
10
5
11
### Features
Original file line number Diff line number Diff line change 1
- version : " 1.8.0 "
1
+ version : " 1.8.1 "
2
2
description : " Multicast UDP service used to provide local network service and host discovery."
3
3
url : " https://github.com/espressif/esp-protocols/tree/master/components/mdns"
4
4
issues : " 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)
5427
5427
}
5428
5428
}
5429
5429
_mdns_service_task_handle = NULL ;
5430
- vTaskDelete ( NULL );
5430
+ vTaskDelay ( portMAX_DELAY );
5431
5431
}
5432
5432
5433
5433
static void _mdns_timer_cb (void * arg )
@@ -5532,16 +5532,17 @@ static esp_err_t _mdns_service_task_stop(void)
5532
5532
{
5533
5533
_mdns_stop_timer ();
5534
5534
if (_mdns_service_task_handle ) {
5535
+ TaskHandle_t task_handle = _mdns_service_task_handle ;
5535
5536
mdns_action_t action ;
5536
5537
mdns_action_t * a = & action ;
5537
5538
action .type = ACTION_TASK_STOP ;
5538
5539
if (xQueueSend (_mdns_server -> action_queue , & a , (TickType_t )0 ) != pdPASS ) {
5539
- vTaskDelete (_mdns_service_task_handle );
5540
5540
_mdns_service_task_handle = NULL ;
5541
5541
}
5542
5542
while (_mdns_service_task_handle ) {
5543
5543
vTaskDelay (10 / portTICK_PERIOD_MS );
5544
5544
}
5545
+ vTaskDelete (task_handle );
5545
5546
}
5546
5547
vSemaphoreDelete (_mdns_service_semaphore );
5547
5548
_mdns_service_semaphore = NULL ;
You can’t perform that action at this time.
0 commit comments