mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
Merge branch 'bugfix/esp_task_wdt_v6.0' into 'release/v6.0'
fix(esp_system): Handle failures correctly in esp_task_wdt_reconfigure() (backport v6.0) See merge request espressif/esp-idf!45897
This commit is contained in:
@@ -596,9 +596,9 @@ esp_err_t esp_task_wdt_reconfigure(const esp_task_wdt_config_t *config)
|
||||
esp_task_wdt_impl_timer_restart(p_twdt_obj->impl_ctx);
|
||||
}
|
||||
|
||||
portEXIT_CRITICAL(&spinlock);
|
||||
err:
|
||||
return ESP_OK;
|
||||
portEXIT_CRITICAL(&spinlock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
esp_err_t esp_task_wdt_stop(void)
|
||||
|
||||
@@ -126,7 +126,7 @@ esp_err_t esp_task_wdt_impl_timer_stop(twdt_ctx_t obj)
|
||||
ret = ESP_ERR_INVALID_STATE;
|
||||
}
|
||||
|
||||
if (ret == ESP_OK) {
|
||||
if (ret == ESP_OK && esp_timer_is_active(ctx->sw_timer)) {
|
||||
ret = esp_timer_stop(ctx->sw_timer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user