Fixed mqtt changed flag

This commit is contained in:
Gunnar Skjold 2023-12-24 07:03:05 +01:00
parent 4c28d512a1
commit c583c2b44a
2 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@ class AmsMqttHandler {
public:
AmsMqttHandler(MqttConfig& mqttConfig, RemoteDebug* debugger, char* buf) {
this->mqttConfig = mqttConfig;
this->mqttConfigChanged = true;
this->debugger = debugger;
this->json = buf;
mqtt.dropOverflow(true);

View File

@ -118,8 +118,8 @@ bool AmsMqttHandler::connect() {
actualClient = mqttClient;
}
mqttConfigChanged = false;
if(debugger->isActive(RemoteDebug::INFO)) debugger->printf_P(PSTR("Connecting to MQTT %s:%d\n"), mqttConfig.host, mqttConfig.port);
mqtt.begin(mqttConfig.host, mqttConfig.port, *actualClient);
#if defined(ESP8266)