Update: DISCONNECT (Issue #31) and others

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2016-10-03 11:17:35 +09:00
parent 76f58a60a3
commit 93df7db12e
22 changed files with 192 additions and 150 deletions

View File

@@ -109,7 +109,11 @@ void PacketHandleTask::run()
client = clist->getClient();
while (client > 0)
{
client->checkTimeover();
if ( client->checkTimeover() )
{
_mqttsnConnection->handleDisconnect(client, 0);
client->disconnected();
}
client = client->getNextClient();
}
/*------ Check Keep Alive Timer & send Advertise ------*/
@@ -200,9 +204,6 @@ void PacketHandleTask::run()
case CONNACK:
_mqttConnection->handleConnack(client, brPacket);
break;
case DISCONNECT:
_mqttConnection->handleDisconnect(client, brPacket);
break;
case PINGRESP:
_mqttConnection->handlePingresp(client, brPacket);
break;