Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2019-10-03 15:13:29 +09:00
parent 271b635d3f
commit 7aa44d94d1
2 changed files with 15 additions and 21 deletions

View File

@@ -170,19 +170,17 @@ void MQTTSNAggregateConnectionHandler::handlePingreq(Client* client, MQTTSNPacke
sendStoredPublish(client);
client->holdPingRequest();
}
else
{
/* create and send PINGRESP to the PacketHandler */
client->resetPingRequest();
MQTTGWPacket* pingresp = new MQTTGWPacket();
/* create and send PINGRESP to the PacketHandler */
client->resetPingRequest();
pingresp->setHeader(PINGRESP);
MQTTGWPacket* pingresp = new MQTTGWPacket();
Event* evt = new Event();
evt->setBrokerRecvEvent(client, pingresp);
_gateway->getPacketEventQue()->post(evt);
}
pingresp->setHeader(PINGRESP);
Event* evt = new Event();
evt->setBrokerRecvEvent(client, pingresp);
_gateway->getPacketEventQue()->post(evt);
}
void MQTTSNAggregateConnectionHandler::sendStoredPublish(Client* client)