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 connection lost when app is in background for above 1 or 2 minutes (Android) #31

Open
letrinhthanhvn opened this issue Sep 27, 2021 · 0 comments

Comments

@letrinhthanhvn
Copy link

I've been trying to use react_native_mqtt to handle a feature that required mqtt connection still alive when app in background mode. But after 1 or 2 minute in background, mqtt connection lost and console: {errorCode: 7, errorMessage: 'AMQJS0007E Socket error:undefined.', reconnect: false, uri: 'ws://...:**/mqtt'}. Is this a bug of library or related to Android OS? And if anyone faced this problem before, please explain it. Thanks a lot!
My library information i'm using:
+ "react_native_mqtt": "^1.3.1",
+ "react-native": "^0.63.4",
+ "react": "^16.13.1",

@letrinhthanhvn letrinhthanhvn changed the title MQTT connection lost when app is in background for above 1 minute (Android) MQTT connection lost when app is in background for above 1 or 2 minutes (Android) Sep 27, 2021
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

1 participant