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

Make the publish function blocking #72

Open
shivams opened this issue Jul 14, 2018 · 1 comment
Open

Make the publish function blocking #72

shivams opened this issue Jul 14, 2018 · 1 comment

Comments

@shivams
Copy link

shivams commented Jul 14, 2018

I put my device to sleep after publishing. However, I have to provide a delay of a few seconds before that, so that publishing is done. Is there any way to know the status of publishing before going to sleep? Alternatively, is there some flag to make the publish function blocking, so that the code doesn't proceed ahead without the publishing been done.

@hirotakaster
Copy link
Owner

publish function is synchronize method. If publish function done, your data already send to mqtt server.
otherwise, you cloud use the QoS =1|2 callback function(mqttqostest.ino) for your checking data.

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