mirror of https://github.com/arendst/Tasmota.git
Do MDNS even if TLS is enabled.
I imagine this was disabled due to memory issues, but this seems to work fine on a Sonoff Basic.
This commit is contained in:
parent
d2d07543b2
commit
5e06ae1d81
|
@ -513,13 +513,11 @@ void MqttReconnect(void)
|
||||||
mqtt_retry_counter = Settings.mqtt_retry;
|
mqtt_retry_counter = Settings.mqtt_retry;
|
||||||
global_state.mqtt_down = 1;
|
global_state.mqtt_down = 1;
|
||||||
|
|
||||||
#ifndef USE_MQTT_TLS
|
|
||||||
#ifdef USE_DISCOVERY
|
#ifdef USE_DISCOVERY
|
||||||
#ifdef MQTT_HOST_DISCOVERY
|
#ifdef MQTT_HOST_DISCOVERY
|
||||||
if (!MqttDiscoverServer() && !strlen(Settings.mqtt_host)) { return; }
|
if (!MqttDiscoverServer() && !strlen(Settings.mqtt_host)) { return; }
|
||||||
#endif // MQTT_HOST_DISCOVERY
|
#endif // MQTT_HOST_DISCOVERY
|
||||||
#endif // USE_DISCOVERY
|
#endif // USE_DISCOVERY
|
||||||
#endif // USE_MQTT_TLS
|
|
||||||
|
|
||||||
char *mqtt_user = NULL;
|
char *mqtt_user = NULL;
|
||||||
char *mqtt_pwd = NULL;
|
char *mqtt_pwd = NULL;
|
||||||
|
@ -585,13 +583,11 @@ void MqttCheck(void)
|
||||||
if (!MqttIsConnected()) {
|
if (!MqttIsConnected()) {
|
||||||
global_state.mqtt_down = 1;
|
global_state.mqtt_down = 1;
|
||||||
if (!mqtt_retry_counter) {
|
if (!mqtt_retry_counter) {
|
||||||
#ifndef USE_MQTT_TLS
|
|
||||||
#ifdef USE_DISCOVERY
|
#ifdef USE_DISCOVERY
|
||||||
#ifdef MQTT_HOST_DISCOVERY
|
#ifdef MQTT_HOST_DISCOVERY
|
||||||
if (!strlen(Settings.mqtt_host) && !mdns_begun) { return; }
|
if (!strlen(Settings.mqtt_host) && !mdns_begun) { return; }
|
||||||
#endif // MQTT_HOST_DISCOVERY
|
#endif // MQTT_HOST_DISCOVERY
|
||||||
#endif // USE_DISCOVERY
|
#endif // USE_DISCOVERY
|
||||||
#endif // USE_MQTT_TLS
|
|
||||||
MqttReconnect();
|
MqttReconnect();
|
||||||
} else {
|
} else {
|
||||||
mqtt_retry_counter--;
|
mqtt_retry_counter--;
|
||||||
|
|
Loading…
Reference in New Issue