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

We need to pass force=false to mosquitto_loop_stop()

... or else any pending published messages aren't sent.
parent 78b20265
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -42,7 +42,7 @@ static void js_finalize_mqtt(JSContext* cx, JSObject* obj)
if(p->handle != NULL) {
mosquitto_disconnect(p->handle);
mosquitto_loop_stop(p->handle, /* force: */true);
mosquitto_loop_stop(p->handle, /* force: */false);
mosquitto_destroy(p->handle);
}
while((msg = msgQueueRead(&p->q, /* timeout: */0)) != NULL)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment