Skip to content

Commit

Permalink
Fix for MQTT server error -- catches error & logs
Browse files Browse the repository at this point in the history
  • Loading branch information
uajqq committed Jan 15, 2025
1 parent 6f441b3 commit 67d9462
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion skins/Belchertown/js/belchertown.js.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -1727,7 +1727,12 @@ var mqtt_payload = "";
// New message from mqtt, process it
function onMessageArrived(message) {
belchertown_debug("MQTT: " + message.payloadString);
update_current_wx(message.payloadString);
try {
update_current_wx(message.payloadString);
} catch(e) {
console.log(e)
return
}
mqtt_payload = jQuery.parseJSON(message.payloadString);
}

Expand Down

0 comments on commit 67d9462

Please sign in to comment.