mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
revert commit 4b2468d61 to fix wifi issue with tasmota core
This commit is contained in:
@@ -33,9 +33,9 @@ void MqttSettingsService::begin() {
|
|||||||
|
|
||||||
void MqttSettingsService::startClient() {
|
void MqttSettingsService::startClient() {
|
||||||
static bool isSecure = false;
|
static bool isSecure = false;
|
||||||
if (_mqttClient != nullptr) {
|
if (_mqttClient) {
|
||||||
// do we need to change the client?
|
// do we need to change the client?
|
||||||
if (_state.enabled && ((isSecure && _state.enableTLS) || (!isSecure && !_state.enableTLS))) {
|
if ((isSecure && _state.enableTLS) || (!isSecure && !_state.enableTLS)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
delete _mqttClient;
|
delete _mqttClient;
|
||||||
@@ -79,9 +79,6 @@ void MqttSettingsService::startClient() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MqttSettingsService::loop() {
|
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)) {
|
if (_reconfigureMqtt || (_disconnectedAt && static_cast<uint32_t>(uuid::get_uptime() - _disconnectedAt) >= MQTT_RECONNECTION_DELAY)) {
|
||||||
// reconfigure MQTT client
|
// reconfigure MQTT client
|
||||||
_disconnectedAt = configureMqtt() ? 0 : uuid::get_uptime();
|
_disconnectedAt = configureMqtt() ? 0 : uuid::get_uptime();
|
||||||
|
|||||||
Reference in New Issue
Block a user