Skip to content

Commit 00c972c

Browse files
committed
mqtt: branch under error check
1 parent 024b136 commit 00c972c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

code/espurna/mqtt.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -2054,14 +2054,14 @@ void _mqttConnect() {
20542054
_mqtt_reconnect_delay =
20552055
mqtt::reconnect::next(_mqtt_reconnect_delay);
20562056

2057-
// Attempt to perform MDNS discovery when configuration was only partially successful
2057+
// Attempt MDNS discovery when configuration was only partially successful
20582058
#if MDNS_SERVER_SUPPORT
2059-
if (_mqtt_error == ErrMDNS) {
2059+
if (_mqtt_error && _mqtt_error == ErrMDNS) {
20602060
_mqttMdnsDiscovery();
20612061
}
20622062
#endif
20632063

2064-
// Do not connect if configuration was not clean
2064+
// Do not connect when configuration was not successful
20652065
if (_mqtt_error) return;
20662066

20672067
_mqtt_state = AsyncClientState::Connecting;

0 commit comments

Comments
 (0)