Skip to content

Commit

Permalink
Keep MainFlowTask alive to handle reboot (jomjol#2325)
Browse files Browse the repository at this point in the history
  • Loading branch information
Slider0007 authored Apr 19, 2023
1 parent 17ffd28 commit 19158c9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions code/components/jomjol_flowcontroll/MainFlowControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 19158c9

Please sign in to comment.