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

MQTT disconnect when the screen is locked #35

Open
chenzhijie opened this issue Sep 10, 2015 · 1 comment
Open

MQTT disconnect when the screen is locked #35

chenzhijie opened this issue Sep 10, 2015 · 1 comment

Comments

@chenzhijie
Copy link

I have given the mqtt client a unique clientId, and the client connect to my sever successfully.After setting up the messageHandler, I can receive message from others..However, when I lock the screen, the client disconnect. And the messageHandler is invalid, so I can't received the offline message.. I have noticed that the MQTT Client have a property keepAlive, but it doesn't work for me..Any idea?

@stefannilsson
Copy link

I guess this could be because of a non-granted continued background execution.
https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html

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