mdns init first starts timer task, then starts service task. if service task failed to be created, timer task needs to be stopped too.
fixed https://ezredmine.espressif.cn:8765/issues/28466
if (!_mdns_service_task_handle) {
xTaskCreatePinnedToCore(_mdns_service_task, "mdns", MDNS_SERVICE_STACK_DEPTH, NULL, 1, (TaskHandle_t * const)(&_mdns_service_task_handle), 0);
if (!_mdns_service_task_handle) {
+ _mdns_stop_timer();
MDNS_SERVICE_UNLOCK();
+ vSemaphoreDelete(_mdns_service_semaphore);
+ _mdns_service_semaphore = NULL;
return ESP_FAIL;
}
}
MDNS_SERVICE_LOCK();
_mdns_stop_timer();
MDNS_SERVICE_UNLOCK();
+ vSemaphoreDelete(_mdns_service_semaphore);
+ _mdns_service_semaphore = NULL;
if (_mdns_service_task_handle) {
mdns_action_t action;
mdns_action_t * a = &action;