BugFix: Network can not handle EPIPE error. Issue#35 #36

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2016-10-07 18:55:03 +09:00
parent d834a1a65b
commit 9de0448130
13 changed files with 246 additions and 252 deletions

View File

@@ -47,6 +47,7 @@ void ClientSendTask::run()
if (ev->getEventType() == EtStop)
{
WRITELOG("%s ClientSendTask stopped.\n", currentDateTime());
delete ev;
break;
}
@@ -76,7 +77,7 @@ void ClientSendTask::log(Client* client, MQTTSNPacket* packet)
{
char pbuf[SIZE_OF_LOG_PACKET * 3];
char msgId[6];
const char* clientId = client ? (const char*)client->getClientId() : NONACTCLT ;
const char* clientId = client ? (const char*)client->getClientId() : UNKNOWNCL ;
switch (packet->getType())
{