0

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?

Amrmsmb
  • 1
  • 27
  • 104
  • 226

1 Answers1

1

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?

hardillb
  • 54,545
  • 11
  • 67
  • 105
  • thank you for the answer. I thought because the server DISCONNECT when the KeepAlive timer schedule finished and no PNGREQ is sent, i should not get LWT. now it is clear. – Amrmsmb Nov 14 '14 at 14:50