From 19158c998ff9862ade97c3f59c8efa58e5b0228c Mon Sep 17 00:00:00 2001 From: Slider0007 <115730895+Slider0007@users.noreply.github.com> Date: Wed, 19 Apr 2023 20:50:49 +0200 Subject: [PATCH] Keep MainFlowTask alive to handle reboot (#2325) --- code/components/jomjol_flowcontroll/MainFlowControl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/components/jomjol_flowcontroll/MainFlowControl.cpp b/code/components/jomjol_flowcontroll/MainFlowControl.cpp index ff5b590d7..974920a4a 100644 --- a/code/components/jomjol_flowcontroll/MainFlowControl.cpp +++ b/code/components/jomjol_flowcontroll/MainFlowControl.cpp @@ -1014,6 +1014,12 @@ void task_autodoFlow(void *pvParameter) vTaskDelay( xDelay ); } } + + while(1) // Keep flow task running to handle necessary sub tasks like reboot handler, etc.. + { + vTaskDelay(2000 / portTICK_PERIOD_MS); + } + vTaskDelete(NULL); //Delete this task if it exits from the loop above xHandletask_autodoFlow = NULL; ESP_LOGD(TAG, "task_autodoFlow: end");