mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-13 15:36:51 +01:00
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:
@@ -114,7 +114,6 @@ void BrokerSendTask::run()
|
||||
{
|
||||
if ( packet->getType() == CONNECT )
|
||||
{
|
||||
client->setWaitWillMsgFlg(false);
|
||||
client->connectSended();
|
||||
}
|
||||
log(client, packet);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace MQTTSNGW
|
||||
/*=================================
|
||||
* Starting prompt
|
||||
==================================*/
|
||||
#define GATEWAY_VERSION " * Version: 0.9.1"
|
||||
#define GATEWAY_VERSION " * Version: 0.9.2"
|
||||
|
||||
#define PAHO_COPYRIGHT0 " * MQTT-SN Transparent Gateway"
|
||||
#define PAHO_COPYRIGHT1 " * Part of Project Paho in Eclipse"
|
||||
|
||||
Reference in New Issue
Block a user