Skip to content

Commit

Permalink
Fix MQTT issue when WiFi is not configured (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Lapointe committed Dec 8, 2021
1 parent fffcd55 commit 621c801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EspMQTTClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ bool EspMQTTClient::_handleMQTT() {
_mqttClient.loop();

// Get the current connection status
bool isMqttConnected = (isWifiConnected() && _mqttClient.connected());
bool isMqttConnected = _mqttClient.connected() && (!_wifiConfigured || _mqttClient.connected());

// Connection established
if (isMqttConnected && !_mqttConnected) {
Expand Down

0 comments on commit 621c801

Please sign in to comment.