-
Notifications
You must be signed in to change notification settings - Fork 469
Description
I'm using the MQTT Paho C++ library in my project. Here's the situation:
1.I use the token_ptr async_client::connect(connect_options opts, void* userContext, iaction_listener& cb) function to connect to a TLS - enabled MQTT server, and the connection is successful.
2.Then, I use the token_ptr async_client::disconnect(int timeout, void* userContext, iaction_listener& cb) function to disconnect from the server.
3.After that, when I try to use the token_ptr async_client::reconnect() function to reconnect, it fails with the error message "10.04.25 14:40:42.258 root ERROR - MQTT exception occurred in reconnect: Code=0, Message=Failure".
However, if I use the token_ptr async_client::connect(connect_options opts, void* userContext, iaction_listener& cb) function again, I can establish the connection successfully. Also, when I don't use TLS encryption, the token_ptr async_client::reconnect() function works fine after disconnection.