Skip to content
Snippets Groups Projects
Commit f77f1984 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix crash in mqtt_startup() when configured broker isn't reachable

parent fe1db772
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3661 passed
...@@ -503,6 +503,7 @@ int mqtt_startup(struct mqtt* mqtt, scfg_t* cfg, struct startup* startup, const ...@@ -503,6 +503,7 @@ int mqtt_startup(struct mqtt* mqtt, scfg_t* cfg, struct startup* startup, const
mqtt_pub_uintval(mqtt, TOPIC_SERVER, "served", mqtt->served); mqtt_pub_uintval(mqtt, TOPIC_SERVER, "served", mqtt->served);
#ifdef USE_MOSQUITTO #ifdef USE_MOSQUITTO
if(mqtt->handle != NULL)
mosquitto_message_callback_set(mqtt->handle, mqtt_message_received); mosquitto_message_callback_set(mqtt->handle, mqtt_message_received);
#endif #endif
if(mqtt->startup->type == SERVER_TERM) { if(mqtt->startup->type == SERVER_TERM) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment