Hello,
I
have a question regarding how the connect logic is handled in the network loop when using mosquitto_loop_start and mosquitto_connect_async with the mosquittolib.
After
receiving a CONNACK and a initial connection have been made with the broker the reconnection is handled as I would expect. That is, if the broker goes offline and we don't receive a PINGRESP in the set keep alive interval disconnect is called and if the broker
then comes back online the libraries network loop handles the reconnection with sending a new CONNECT. However, if the client never made this initial connection (no CONNACK after sending the first CONNECT) the library will not try to connect again and a new
call to mosquitto_connect_async as well as mosquitto_loop_start is required since it seams that the network thread is also stopped?
Furthermore,
the reponse code for both mosquitto_connect_async and mosquitto_loop_start is successful.
I
might have misinterpereted the documentation but I thought only one call to mosquitto_connect_async would need to be done if the call was successful.
Best regards
|