BugFix: PINGREQ & PINGRESP can't be received and sent.

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2016-08-07 15:10:06 +09:00
parent 00d5552d30
commit dcdb51b5d6
7 changed files with 15 additions and 13 deletions

View File

@@ -246,6 +246,7 @@ void MQTTSNConnectionHandler::handlePingreq(Client* client, MQTTSNPacket* packet
/* send PINGREQ to the broker */
MQTTGWPacket* pingreq = new MQTTGWPacket();
pingreq->setHeader(PINGREQ);
Event* ev1 = new Event();
ev1->setBrokerSendEvent(client, pingreq);
Event* evt = new Event();
evt->setBrokerSendEvent(client, pingreq);
_gateway->getBrokerSendQue()->post(evt);
}