revert commit 4b2468d61 to fix wifi issue with tasmota core

This commit is contained in:
MichaelDvP
2025-09-16 14:52:30 +02:00
parent 025c430611
commit c3b9c1ef98

View File

@@ -33,9 +33,9 @@ void MqttSettingsService::begin() {
void MqttSettingsService::startClient() {
static bool isSecure = false;
if (_mqttClient != nullptr) {
if (_mqttClient) {
// do we need to change the client?
if (_state.enabled && ((isSecure && _state.enableTLS) || (!isSecure && !_state.enableTLS))) {
if ((isSecure && _state.enableTLS) || (!isSecure && !_state.enableTLS)) {
return;
}
delete _mqttClient;
@@ -79,9 +79,6 @@ void MqttSettingsService::startClient() {
}
void MqttSettingsService::loop() {
if (!_state.enabled || _mqttClient == nullptr || emsesp::EMSESP::system_.systemStatus() != 0) {
return;
}
if (_reconfigureMqtt || (_disconnectedAt && static_cast<uint32_t>(uuid::get_uptime() - _disconnectedAt) >= MQTT_RECONNECTION_DELAY)) {
// reconfigure MQTT client
_disconnectedAt = configureMqtt() ? 0 : uuid::get_uptime();