Reconnect Wifi after lost conneciton
This commit is contained in:
@@ -95,7 +95,13 @@ void setup() {
|
||||
}
|
||||
|
||||
void loop() {
|
||||
if (!client.connected()) {
|
||||
if (WiFi.status() != WL_CONNECTED) {
|
||||
WiFi.disconnect();
|
||||
delay(1000);
|
||||
setup_wifi();
|
||||
}
|
||||
|
||||
if ((WiFi.status() == WL_CONNECTED)&&(!client.connected())) {
|
||||
reconnect();
|
||||
}
|
||||
client.loop();
|
||||
|
||||
Reference in New Issue
Block a user