Some adjustments to MQTT

This commit is contained in:
Gunnar Skjold
2023-12-24 07:10:58 +01:00
parent c583c2b44a
commit 7a70bd7511

View File

@@ -53,8 +53,6 @@ bool AmsMqttHandler::connect() {
if(debugger->isActive(RemoteDebug::INFO)) debugger->printf_P(PSTR("CA accepted\n"));
} else {
if(debugger->isActive(RemoteDebug::WARNING)) debugger->printf_P(PSTR("CA was rejected\n"));
delete mqttSecureClient;
mqttSecureClient = NULL;
return false;
}
#endif
@@ -102,10 +100,6 @@ bool AmsMqttHandler::connect() {
if(debugger->isActive(RemoteDebug::INFO)) debugger->printf_P(PSTR("CA verification disabled\n"));
mqttSecureClient->setInsecure();
}
if(mqttClient != NULL) {
mqttClient->stop();
delete mqttClient;
}
}
actualClient = mqttSecureClient;