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

mosquitto_loop_stop() can block even when force=true

Contrary to https://mosquitto.org/api/files/mosquitto-h.html#mosquitto_loop_stop, passing force=true is not enough for the mosquitto network thread to end, mosquitto_disconnect() must be called.
parent e5bd0b63
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4350 passed
......@@ -40,8 +40,8 @@ static void js_finalize_mqtt(JSContext* cx, JSObject* obj)
if((p = (private_t*)JS_GetPrivate(cx,obj)) == NULL)
return;
if(p->handle != NULL) {
mosquitto_disconnect(p->handle);
mosquitto_loop_stop(p->handle, /* force: */true);
mosquitto_destroy(p->handle);
}
......
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