diff --git a/src/EspMQTTClient.cpp b/src/EspMQTTClient.cpp index d45bb3a..d651ced 100644 --- a/src/EspMQTTClient.cpp +++ b/src/EspMQTTClient.cpp @@ -269,7 +269,11 @@ void EspMQTTClient::loop() if (_enableSerialLogs) Serial.println("MQTT!: Can't connect to broker after too many attempt, resetting board ..."); - ESP.reset(); + #ifdef ESP8266 + ESP.reset(); + #else + ESP.restart(); + #endif } } else