Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] mosquitto library stops working

Title: RE: [mosquitto-dev] mosquitto library stops working

Hi all,


I'm using the mosquitto_loop_forever() function. Whenever the described behaviour occurs, the mosquitto_loop_write() function in mosquitto_loop() is not called any more (mosquitto.c line 974). So in my case, the FD_ISSET() Macro returns 0. I don't get, what this macro does!? Does it mean that my socket is stuck?


Btw, the publish function is not returning an error, when the maximum in-flight message count is reached (20 in my case). Is that ok?


Thanks and Regards,

Chris


 
-----Original message-----
From: Christoph Rotter <cr@xxxxxxxxxxxx>
Sent: Monday 24th October 2016 14:44
To: mosquitto-dev@xxxxxxxxxxx
Subject: [mosquitto-dev] mosquitto library stops working

Hi all,


I am using the mosquitto c sourcecode (1.4.10) in my raspberry project (Raspbian Jessy). In my current test setup, I have a condition, where mosquitto stops working.


In my test setup I’m calling the mosquitto_publish() function 5 times as fast as possible and then wait for 2 seconds (75 Bytes, qos 2, retain false, topic: "testtarget/status"). The broker is receiving the messages correctly. Normally this setup runs forever. Then I subscribe a topic (e.g. "testtarget/command"). I manually publish a message on this topic from another device. When the subscribed message reaches the testtarget while it is still publishing messages, mosquitto just stops working in the out direction. The target is not able to publish messages any more.

I attached the debug output from my code and the mosquitto library to this email. 


Any suggestions? Anything that I can imlement to make it safer?


Thanks and Regards,

Chris

_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mosquitto-dev

Back to the top