-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
mosquitto_loop_misc returns MOSQ_ERR_KEEPALIVE, client gets disconnected, server reports socket errors #3013
Comments
Hello, |
mosquitto version: 1.6.10
platform: CentOS 7.9
Hello,
I'm trying to use libmosquitto in an application with many open fds.
Due to issue #1299,
mosquitto_loop()
function cannot be relied upon, so I attempted to implement my own alternative based onepoll()
,mosquitto_loop_read()
,mosquitto_loop_write()
andmosquitto_loop_misc()
instead, using answer to #2335 as inspiration.The code looks like this:
I'm encountering stability issues, with
mosquitto_loop_misc()
returningMOSQ_ERR_KEEPALIVE
, which is not a documented return value and seems to be returned frommosquitto__check_keepalive()
, but I don't know what to do with this result.My client eventually gets disconnected, with the following log on the broker side:
When attempting this with a TLS connection, it gets worse and the client is missing a lot of messages (client is consumer-only with many topic subscriptions, managed from another thread).
Is there something I'm doing wrong, or some way I can work around this issue?
Regards,
The text was updated successfully, but these errors were encountered: