Re: [mqtt] crashes after publish

Skip to first unread message

Dustin Sallings

Mar 22, 2021, 11:08:06 AM3/22/21
I don't know the mosquitto client, but I understand it generally works, so if you wrote a program and your program crashes, it's probably a bug in your program.  Without seeing the source code to your program it's not going to be easy to guess what you did wrong.

On Mon, Mar 22, 2021, 03:54 Maayan Mamalya <> wrote:
I am new to MQTT, and mosquitto library.
I am implementing mqtt-client with Mosquitto library.
When I publish a message, crash accrued, and I cannot understand why.  
I know that if I am using with other threads than I should use mosquitto_loop_start, however it returns 'MOSQ_ERR_NOT_SUPPORTED', which it means, by the comments, thread support is not available.
However I do not how to build the source code in Windows with thread, is there any way?

In addition I found in the following link some example to implement with thread safe, but still there are crashes. ( Is anyone can help me?   

Thanks you,

To learn more about MQTT please visit
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Maayan Mamalya

Mar 22, 2021, 11:44:01 AM3/22/21
Thank for your answer, I actually  understood that I used with lib_init - which explicitly is written that it is not thread safe, and I added mosquitto_set_threaded.

ב-יום שני, 22 במרץ 2021 בשעה 17:08:06 UTC+2, כתב/ה:
Reply all
Reply to author
0 new messages