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

unsent messages at disconnect #93

Open
blacktek opened this issue Aug 14, 2018 · 1 comment
Open

unsent messages at disconnect #93

blacktek opened this issue Aug 14, 2018 · 1 comment

Comments

@blacktek
Copy link

after publish I do one loop() and then a disconnect(), but very often there are unsent messages that get lost.

Is there a clean way to verify if there are still messages in the queue and then iterate a loop() until the queue is empty? I could do this by using a counter to increment at each publish and to decrement at each onPublish, but is not a clean approach

@mgdm
Copy link
Owner

mgdm commented Nov 21, 2018

One loop isn't enough. I'd probably go for the counter option. I don't know offhand of any way to see if there's anything left in flight in the queue, I'll have another look though.

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

2 participants