Description
Describe the bug
My issue is 100% like #117 which is now closed.
- Network is down for over several hours, and then it goes back up and resumes the MQTT connection.
- Everything looks normal but the client never recieves any messages. Kinda as if the subscription got lost?
Based on the information on the old issue that I referenced, it says I need to manually re-subscribe if session_present
is false when the connection is resumed in connection_success
My initial thought was that this library would handle the re-connection by itself.
I tried debugging the internal state and saw that the connection_count increases with time, when network is down and goes up after several hours. Is it because a new session was created?
I would love to have more information on this.
Thanks!
Expected Behavior
I expected the connection to resume without any silent failure.
Current Behavior
The connection is resumed but no messages are received
Reproduction Steps
- Connect to MQTT and subscribe to a topic
- Turn off the network on the PC for 2-4 hours
- Turn on the network on the PC
- Whe connection is resumed, note how the client recieves no messages. Also note that session_present is false in connection_success
Possible Solution
Re-subscribe to the topics automatically if re-connection is handled by this SDK.
Additional Information/Context
Using browser version
SDK version used
1.19.1
Environment details (OS name and version, etc.)
Browser Chrome on MacOS