Skip to content
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

auto reconnect stopped after a few times #3107

Open
tdk2nyt opened this issue Sep 9, 2024 · 0 comments
Open

auto reconnect stopped after a few times #3107

tdk2nyt opened this issue Sep 9, 2024 · 0 comments

Comments

@tdk2nyt
Copy link

tdk2nyt commented Sep 9, 2024

mosquitto version: 2.0.15
system: Linux kernel 3.4.40

Hi,

I use libmosquitto as MQTT client. One day, I found MQTT connection lost, I checked log that recorded a few reconnection events, but it stopped to reconnect with Unable to connect (Lookup error.)
In log, there is a strange scenario: the app try to subscribe topic, this is invoked in on_connect callback, subscribe fails with code 4(MOSQ_ERR_NO_CONN)

I'm using these APIs:
MQTT_PROTOCOL_V311
mosquitto_connect_bind_async
mosquitto_loop_start
mosquitto_connect_v5_callback_set
mosquitto_subscribe_v5_callback_set
mosquitto_message_v5_callback_set
mosquitto_disconnect_v5_callback_set
mosquitto_publish_v5_callback_set

Any suggestion is appreciated, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant