From ddfc9f9dd0aa87436c28f67a968cc366b2fbde38 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Wed, 18 Oct 2023 07:12:44 +0200 Subject: [PATCH] mqtt use main task again --- lib/framework/MqttSettingsService.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/framework/MqttSettingsService.cpp b/lib/framework/MqttSettingsService.cpp index 0025e7023..86a0a5bed 100644 --- a/lib/framework/MqttSettingsService.cpp +++ b/lib/framework/MqttSettingsService.cpp @@ -59,7 +59,7 @@ void MqttSettingsService::startClient() { #if CONFIG_IDF_TARGET_ESP32S3 if (_state.rootCA.length() > 0) { isSecure = true; - _mqttClient = static_cast(new espMqttClientSecure(espMqttClientTypes::UseInternalTask::YES)); + _mqttClient = static_cast(new espMqttClientSecure(espMqttClientTypes::UseInternalTask::NO)); if (_state.rootCA == "insecure") { static_cast(_mqttClient)->setInsecure(); } else { @@ -72,7 +72,7 @@ void MqttSettingsService::startClient() { } #endif isSecure = false; - _mqttClient = static_cast(new espMqttClient(espMqttClientTypes::UseInternalTask::YES)); + _mqttClient = static_cast(new espMqttClient(espMqttClientTypes::UseInternalTask::NO)); static_cast(_mqttClient)->onConnect(std::bind(&MqttSettingsService::onMqttConnect, this, _1)); static_cast(_mqttClient)->onDisconnect(std::bind(&MqttSettingsService::onMqttDisconnect, this, _1)); } @@ -83,7 +83,7 @@ void MqttSettingsService::loop() { _disconnectedAt = configureMqtt() ? 0 : uuid::get_uptime(); _reconfigureMqtt = false; } - // _mqttClient->loop(); // done by mqtt task + _mqttClient->loop(); // done by mqtt task } bool MqttSettingsService::isEnabled() {