eclipse / mosquitto.rsmb

Mosquitto rsmb
82 stars 42 forks source link

Will messages of MQTT-SN clients not published #26

Open gazally opened 8 years ago

gazally commented 8 years ago

I noticed my MQTT clients' wills were getting published but not MQTT-SN clients. Upon some investigation into the code I found MQTTProtocol_keepalive in MQTTProtocolClient.c which is responsible for closing timed out client sessions with the send_will flag set. It iterates through bstate->clients and checks whether client->protocol == PROTOCOL_MQTTS. However that is always going to be false because the MQTT-SN clients are not in bstate->clients, they are in bstate->mqtts_clients.

aignacio commented 7 years ago

up!