We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ebc128 commit 292bdbeCopy full SHA for 292bdbe
host/openbeacon-mqtt/src/main.c
@@ -333,7 +333,9 @@ main (int argc, char **argv)
333
/* initialize Mosquitto library */
334
mosquitto_lib_init();
335
mosq = mosquitto_new("openbeacon-mqtt", true, NULL);
336
- mosquitto_connect(mosq, (argc > 1) ? argv[1] : "127.0.0.1", MOSQUITTO_TCP_PORT, 600);
+ ret = mosquitto_connect(mosq, (argc > 1) ? argv[1] : "127.0.0.1", MOSQUITTO_TCP_PORT, 600);
337
+ if (ret != MOSQ_ERR_SUCCESS)
338
+ return -1;
339
mosquitto_loop_start(mosq);
340
341
/* main loop */
0 commit comments