-
Notifications
You must be signed in to change notification settings - Fork 11
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
Workers get stuck when waiting for Paho Token #31
Comments
@pricelessrabbit Thank you
|
hi @mteodor tried both the async goroutine and WaitTimeout and both solutions works, but in case of the goroutine, i'm a bit worried in case of a long disconnection: |
@pricelessrabbit than combination of both seems best solution, what do you think? Could you make a PR for this? |
i have this in production in my fork now and it works as expected. if it looks ok to you ill open a PR. pls tell me if i have to change the logging or any other change thanks
|
Yes, please send this PR |
STR
expected
actual
Seems that the issue is in the Token.wait() used here
when a worker publish to mqtt and qos = 2, paho wait for reconnection to send the message so the worker get stuck in the wait() callback and cant manage further messages.
I managed to fix it using
Token.WaitTimeout
In that way when waiting exceeds 3 seconds the worker returns online
The text was updated successfully, but these errors were encountered: