fusesource / mqtt-client

A Java MQTT Client
http://mqtt-client.fusesource.org/
Apache License 2.0
1.27k stars 369 forks source link

messageId should be defined as unsigned short #37

Open workanandr opened 9 years ago

workanandr commented 9 years ago

messageId field defined in all the MQTT messages should be "unsigned short" as the spec says that it is a 16-bit unsigned. Currently it is defined as short. It causes the value to be interpreted as -ve once the short MAX_VALUE is crossed.