keep-alivemqttmessagebrokerpahoandroid-open-accessory

The server DISCONNECT and I receive LWT message?


Isn't if the server did not receive any messages from the client within the (1.5) * KeepAlivetime and the client did not send any PINGREQ within the aforementioned period, the server should DISCONNECT?

If yes, why I am receiving LWT message which is should not be received as DISCONNECT occures?


Solution

  • Last will and Testement will be sent if the client does not explicitly disconnect it's self.

    If the broker disconnects the client due to a ping time out then the LWT will be sent, this is the specific reason why the LWT feature exists.

    Or do you mean your now disconnected client is receiving it's own LWT?