njh / mqtt-sn-tools

Command line tools written in C for the MQTT-SN (MQTT for Sensor Networks) protocol
MIT License
195 stars 84 forks source link

Wait for disconnect acknowledge into mqtt-sn-pub and mqtt-sn-sub. #7

Closed MichalFoksa closed 9 years ago

MichalFoksa commented 9 years ago

Added wait for disconnect acknowledge (DISCONNECT packet) by a broker before socket closure into mqtt-sn-pub and mqtt-sn-sub.

njh commented 9 years ago

Thank you very much for the pull request - I am not sure how I missed that clients should wait for a Disconnect reply packet.

Please can you change the packet type and not check the return code?