monstrenyatko / ArduinoMqtt

MQTT client for Arduino

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Message disconnected came after connected

tarzan115 opened this issue · comments

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!

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.

thank you. I will check broker.