Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2016-12-15 11:40:17 +09:00
parent d386541c1a
commit 1a415bfebd
4 changed files with 56 additions and 26 deletions

View File

@@ -131,11 +131,19 @@ void BrokerRecvTask::run(void)
}
else
{
if ( rc == 0 )
if ( rc == 0 ) // Disconnected
{
client->getNetwork()->close();
delete packet;
goto nextClient;
/* delete client when the client is not authorized on & session is clean */
_gateway->getClientList()->erase(client);
if ( client )
{
client = client->getNextClient();
}
continue;
}
else if (rc == -1)
{