Bugfix of DISCONNECT and ClientSend error message

Close the Connection after sending DISCONNECT.
Separate multicast error message.

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2020-10-12 17:30:11 +09:00
parent aa199cdf9b
commit 1f9241b260
2 changed files with 38 additions and 24 deletions

View File

@@ -41,7 +41,7 @@ BrokerSendTask::BrokerSendTask(Gateway* gateway)
BrokerSendTask::~BrokerSendTask()
{
WRITELOG("BrokerSendTask is deleted normally.\r\n");
}
/**
@@ -121,6 +121,11 @@ void BrokerSendTask::run()
{
client->connectSended();
}
else if ( packet->getType() == DISCONNECT )
{
client->getNetwork()->close();
client->disconnected();
}
log(client, packet);
}
else