monstrenyatko / ArduinoMqtt

MQTT client for Arduino
MIT License
72 stars 13 forks source link

Message disconnected came after connected #6

Closed tarzan115 closed 7 years ago

tarzan115 commented 7 years ago

Hi @monstrenyatko when I use your library I got a problem. I set LWT message when a disconnect is "DISCONNECTED" and I set in the broker is CONNECTED when having a client connect. but when I set my device to connect my server. after that, I turn off the server in 3 seconds and then turn on. I got CONNECTED message came first and DISCONNECTED later. please check that. I mean it must be DISCONNECTED came first and CONNECTED later.

I set keepalive is 15

thank you!

monstrenyatko commented 7 years ago

Hi @tarzan115 I can't get your problem...client has no control on the broker. Broker triggers the LWT message automatically when it detects the client disconnection.

tarzan115 commented 7 years ago

thank you. I will check broker.