Closed jpolaroid1978 closed 9 years ago
Nice catch! Would you like to help with the implementation of the fix? I think the parsing needs to be fixed into mqtt-packet, plus some handling of it should be done here.
Which broker and version of it are you using?
Hi,
Sure I would be happy to help any way that I can. What would be the optimal way to get a proposed change out to you for review?
We saw the problem while trying the client out yesterday with the IBM IoT Foundation service https://internetofthings.ibmcloud.com/ .
Send me a pull request on both projects, remember to update unit tests.
Hi,
I sent a pull request for mqtt-packet.
After looking at some other clients, it is not clear to me yet what to do as far as handling other than not failing when the bit is set (which the mqtt-packet fix achieves I think).
Please let me know what you think, thanks!
That was released as mqtt-packet 3.2.0. You should get it if you reinstall MQTT.js.
Hi ,
It seems like the SP (Session present) bit, from the MQTT 3.1.1 spec section 3.2.2.2 (ref link) below is not implemented in the client. This seems to cause CONNACK packets returned from the server return code to be mistakenly processed as rc 256 for a return code of zero.
http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html