Closed cuttlfish closed 1 week ago
Apologies for the delay in responding.
Is there any chance you could provide a minimal version of your code (it's easy to send the larger message with mosquitto_pub
for testing but a lot quicker for us to duplicate this if we have your code).
I'm going to close this due to it's age/inactivity. Please do feel free to reopen if you are able to provide code to reproduce the issue.
In MQTT sync mode, I am seeing a failure in subscribe if cleanSession is set to 0 and there is a large (> 1 MB) data in persistent data that needs to be stored.
First a large persisent data gets restored with this print
The subscribe fails with this message
I am calling subscribe right after MQTT connects which succeeded. But it seems that the socket layer still have not finish writing the persistent packet in outboundMsgs. The failure in subscribe causes MQTT to disconnect due to SOCKET_ERROR returned.
It seems the subscribe should be done before any persistent packets gets restored?