Blynk is disconnected, retry connection... then reset

I’ve facing with a problem that I’ve not considere before.
If my local server is down, I get this error message:

Blynk is disconnected, retry connection...

After this message my Arduino Mega restart from the beginning of my sketch.

I’ve considered yet the possibility of WiFi down, so in this case mu sketch run offline without blynk.

Now if WiFi it’s okay and server is down is a new condition for me, is there any way to not reset, but continue anyway offline?

@naamah75 I have quite a detailed routine for the ESP / Arduino to continue without Blynk but I think for your requirement you would just change:;



Yes! it’s very simply!
Why I’ve not thinked before! :frowning2: