Only do mqtt stuff if ethernet is connected.

This commit is contained in:
Chris Giacofei 2022-01-14 13:44:14 -05:00
parent 4d62533d14
commit a8e3e6d0ed

View File

@ -128,7 +128,7 @@ void loop() {
unsigned long elapsedTime = (millis() - lastRun);
if (elapsedTime >= UpdateInterval) {
if (Ethernet.linkStatus() == LinkON && elapsedTime >= UpdateInterval) {
mqtt_client.loop();
//if (!mqtt_client.connected()) ConnectMQTT();