fusesource / mqtt-client

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

fixing the reconnect behavior #107

Closed mdaffner closed 5 years ago

mdaffner commented 5 years ago

getNextMessageId is now synchronized to avoid the ProtocolException invalid message id The duplicate flag of a frame is only set if its a PUBLISH frame Checking if the transport is null before stopping it and before offering a frame to it. Client does no longer try to reconnect when there is already a running reconnect.

dejanb commented 5 years ago

@mdaffner formatting of the code seems messed again. Can you please fix this and squash everything into a single commit. And we're good to go.