New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No data sent/recv when using mosquitto_connect_async with my own loop #990
Comments
Is my approach correct? There are some things that I am not sure about:
I have been experimenting doing variations of the program above, and it looks like it works if I call |
I've found the commit that introduces the problem, it's not you at fault :) I still need to diagnose the underlying problem, that is a task for next week. For reference - if you're using mosquitto_loop_start(), you should not use any of the other loop functions, the library is doing the work for you. |
Thanks for the feedback. I was currently working around the bug by calling |
I think this is fixed on the |
Thanks, I will give it a try as soon as I have a slot. |
Finally I got time to test this. I have tried with version 1.5.4 (that I can see the fix has been merged into). The example above works if I connect using Thank you very much for the fix! |
Version 1.5.4. * Fixes memory leak, GitHub eclipse#592 * Fixes TLS reconnects, GitHub eclipse#990 MAINE-140, MAINE-361
I have an application that uses asynchronous operation without the threaded interface. I need to work like this because I have a library managing file descriptors using epoll, and I need to use it to manage the mosquitto socket.
This was working flawlessly with mosquitto 1.4.8 and 1.4.10. But since I updated to version 1.5.1, it stopped working. And the same happens with 1.5.3. I have coded the following minimum [non] working example:
If I compile and run this code using mosquitto 1.4.10, I get the following output:
Everything works, and if I capture the packets, I can see the cert and key exchange prior to the CONNACK. But when I run the program using mosquitto 1.5.3, the "write_triggered" message is printed once and the connection never completes. If I monitor the network using tcpdump, I can see that the TCP handshake is completed, but the TLS negotiation never starts:
And that's all. If I remove the
EPOLLET
fromEVENTS
, the "write triggered" message is continuously printed, but the connection is never completed, the cert/key exchange never happens. So it looks likemosquitto_loop_write()
is not working as expected.Am I doing anything wrong, or is there a regression?
The text was updated successfully, but these errors were encountered: