Dealing with internet outages

That’s not a very neat or efficient way to do it, and the logic is flawed because you are assuming that a WiFi connection automatically equals a Blynk server connection.

You should be using timers and two flags to test your online status - set when WL_CONNECTED and Blynk.connected are true.

Pete.