Do an MDNS resolve before using the cached host.

MDNS shouldn't be aggressively cached, since the IP could change. This
makes using DHCP for the host a lot easier.
This commit is contained in:
Mike 2019-01-15 17:26:51 -08:00
parent ddcc92bdb4
commit d2d07543b2
1 changed files with 1 additions and 1 deletions

View File

@ -516,7 +516,7 @@ void MqttReconnect(void)
#ifndef USE_MQTT_TLS
#ifdef USE_DISCOVERY
#ifdef MQTT_HOST_DISCOVERY
if (!strlen(Settings.mqtt_host) && !MqttDiscoverServer()) { return; }
if (!MqttDiscoverServer() && !strlen(Settings.mqtt_host)) { return; }
#endif // MQTT_HOST_DISCOVERY
#endif // USE_DISCOVERY
#endif // USE_MQTT_TLS