Skip to content

Commit

Permalink
Simplify MQTT code
Browse files Browse the repository at this point in the history
  • Loading branch information
xx committed May 12, 2024
1 parent cfb9865 commit 5ddbd90
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions firmware/esp32/gdoor/src/mqtt_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ namespace MQTT_HELPER { //Namespace as we can only use it once
mqttClient.loop();
if (!mqttClient.connected()) {
JSONDEBUG("MQTT lost connection");
mqttClient.connect("GDoor", user, password);
mqttClient.subscribe(rx_topic_name);
newly_connected = true;
}
}
}
Expand Down

0 comments on commit 5ddbd90

Please sign in to comment.