Skip to content

MQTT: Don't try to publish if connection not established

Setting up a new system and when sbbs tried to connect to the mqtt service, it reported:

Client disconnected due to protocol error.

sbbs reports: 9/3 13:29:02 term MQTT connecting to broker 127.0.0.1:1883

but doesn't say it cannot connect, then proceeds with:

9/3 13:29:02 term Terminal Server ERROR 4 (2) publishing node status 9/3 13:29:02 evnt DAILY ERROR 4 (2) publishing node status

MQTT should probably not try to publish when it's not connected.

Edited by Nigel Reed