Skip to content

Commit

Permalink
Fix: Error if Connecting to MQTT false
Browse files Browse the repository at this point in the history
  • Loading branch information
kmaximv committed Dec 8, 2016
1 parent 4525d5e commit 5c5be33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion esp_sensor/esp_sensor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ bool MqttConnect() {

addLog_P(LOG_LEVEL_INFO, "MqttConnect: Connecting to MQTT...");
if ((ret = mqtt.connect()) != 0) { // connect will return 0 for connected
snprintf_P(log, sizeof(log), PSTR("MqttConnect: Error: %s"), mqtt.connectErrorString(ret));
snprintf_P(log, sizeof(log), PSTR("MqttConnect: Error: %s"), String(ret).c_str());
addLog(LOG_LEVEL_ERROR, log);
mqtt.disconnect();
return false;
Expand Down

0 comments on commit 5c5be33

Please sign in to comment.