fhmq / hmq

High performance mqtt broker
Apache License 2.0
1.32k stars 273 forks source link

client disconnect fixed #120

Closed TrickIt closed 3 years ago

TrickIt commented 3 years ago

If receive a client disconnect pack: 1.Then need to break the read packet loop before next loop start, to avoid a IO error. 2.To clear will msg, according to MQTT 3.1.1: "The Will Message MUST be published when the Network Connection is subsequently closed unless the Will Message has been deleted by the Server on receipt of a DISCONNECT Packet".