Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Paho » MQTTClient_connect() failure(MQTTClient_connect() fail if called in child thread)
MQTTClient_connect() failure [message #1833192] Tue, 06 October 2020 10:29 Go to next message
Marco Cacre is currently offline Marco CacreFriend
Messages: 2
Registered: October 2020
Junior Member
Hi everybody,

i'm a newbe on mqtt protocol and interfaces and this is my first post, so excuse me in advance if the question can be too trivial.
I'm facing a problem using the latest paho C library (paho-mqtt3cs) version 1.3.5.
I did and compiled a simple test on my ubuntu laptop and execute it with the mosquitto broker running on localhost.

The test is very simple, does a connection, a publish and a disconnection prior to exit.
The test run correctly but the problem appears when a try to daemonize it before to call the paho library functions, the MQTTClient_connect() fail with return code -1 when called by the child thread.

I didn't manage to understand the reason

I attached the source code of this test.

thanks a lot for any kind of help or suggestion

Marco
  • Attachment: test.c
    (Size: 6.61KB, Downloaded 78 times)
Re: MQTTClient_connect() failure [message #1833219 is a reply to message #1833192] Wed, 07 October 2020 08:09 Go to previous message
Marco Cacre is currently offline Marco CacreFriend
Messages: 2
Registered: October 2020
Junior Member
Sorry I answer to myself, it should be a good rule to read the documentation carefully before asking for information, I was too rushed, the problem above should be due to the use of synchronous MQTT functions.

Marco
Previous Topic:Problem with multiple clients in one python process
Next Topic:TLS Certificate Verify Failure in paho-mqtt implementation
Goto Forum:
  


Current Time: Fri May 03 12:48:13 GMT 2024

Powered by FUDForum. Page generated in 0.02785 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top