mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 18:56:38 +00:00
Merge pull request #9674 from s-hadinger/minimal_notls
Don't try to connect to TLS with Tasmota-minimal
This commit is contained in:
commit
c0c198f957
@ -603,12 +603,21 @@ void MqttReconnect(void)
|
||||
UdpDisconnect();
|
||||
#endif // USE_EMULATION
|
||||
|
||||
AddLog_P(LOG_LEVEL_INFO, S_LOG_MQTT, PSTR(D_ATTEMPTING_CONNECTION));
|
||||
|
||||
Mqtt.connected = false;
|
||||
Mqtt.retry_counter = Settings.mqtt_retry;
|
||||
TasmotaGlobal.global_state.mqtt_down = 1;
|
||||
|
||||
#ifdef FIRMWARE_MINIMAL
|
||||
#ifndef USE_MQTT_TLS
|
||||
// Don't try to connect if MQTT requires TLS but TLS is not supported
|
||||
if (Settings.flag4.mqtt_tls) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
AddLog_P(LOG_LEVEL_INFO, S_LOG_MQTT, PSTR(D_ATTEMPTING_CONNECTION));
|
||||
|
||||
char *mqtt_user = nullptr;
|
||||
char *mqtt_pwd = nullptr;
|
||||
if (strlen(SettingsText(SET_MQTT_USER))) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user