Update: Set WaitWillMsgFlg before posting Event. to protect repeated

WILLMSG before seending CONNECT.

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2016-10-17 10:07:59 +09:00
parent 9de0448130
commit 9b7c25b28c
3 changed files with 2 additions and 2 deletions

View File

@@ -200,6 +200,7 @@ void MQTTSNConnectionHandler::handleWillmsg(Client* client, MQTTSNPacket* packet
/* Send CONNECT to the broker */
Event* evt = new Event();
evt->setBrokerSendEvent(client, mqttPacket);
client->setWaitWillMsgFlg(false);
_gateway->getBrokerSendQue()->post(evt);
}
}