From 7a70bd7511c758448ec4f920179d038aec7b77cb Mon Sep 17 00:00:00 2001 From: Gunnar Skjold Date: Sun, 24 Dec 2023 07:10:58 +0100 Subject: [PATCH] Some adjustments to MQTT --- lib/AmsMqttHandler/src/AmsMqttHandler.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/AmsMqttHandler/src/AmsMqttHandler.cpp b/lib/AmsMqttHandler/src/AmsMqttHandler.cpp index fe8c73fb..16dba846 100644 --- a/lib/AmsMqttHandler/src/AmsMqttHandler.cpp +++ b/lib/AmsMqttHandler/src/AmsMqttHandler.cpp @@ -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;