You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm doing ESP.restart() in response to a restart message sent by Telegram client. However, after device reboots, it get the same restart message, and eventually restarts forever. How do I avoid executing the same message again after restart?
The text was updated successfully, but these errors were encountered:
If you restart from within the function that processes messages, the processing of the current message will be incomplete. Instead do something like this:
Make a global variable: bool RestartTriggered = false;
Change the variable instead at where the ESP.restart() is currently: RestartTriggered = true;
Add a check in your loop() for restart: if (RestartTriggered == true) {ESP.restart();}
I'm doing
ESP.restart()
in response to a restart message sent by Telegram client. However, after device reboots, it get the same restart message, and eventually restarts forever. How do I avoid executing the same message again after restart?The text was updated successfully, but these errors were encountered: