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:
Mike 2019-01-15 18:08:28 -08:00
parent d2d07543b2
commit 5e06ae1d81
1 changed files with 0 additions and 4 deletions

View File

@ -513,13 +513,11 @@ void MqttReconnect(void)
mqtt_retry_counter = Settings.mqtt_retry;
global_state.mqtt_down = 1;
#ifndef USE_MQTT_TLS
#ifdef USE_DISCOVERY
#ifdef MQTT_HOST_DISCOVERY
if (!MqttDiscoverServer() && !strlen(Settings.mqtt_host)) { return; }
#endif // MQTT_HOST_DISCOVERY
#endif // USE_DISCOVERY
#endif // USE_MQTT_TLS
char *mqtt_user = NULL;
char *mqtt_pwd = NULL;
@ -585,13 +583,11 @@ void MqttCheck(void)
if (!MqttIsConnected()) {
global_state.mqtt_down = 1;
if (!mqtt_retry_counter) {
#ifndef USE_MQTT_TLS
#ifdef USE_DISCOVERY
#ifdef MQTT_HOST_DISCOVERY
if (!strlen(Settings.mqtt_host) && !mdns_begun) { return; }
#endif // MQTT_HOST_DISCOVERY
#endif // USE_DISCOVERY
#endif // USE_MQTT_TLS
MqttReconnect();
} else {
mqtt_retry_counter--;