Flush message immediately

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2021-05-08 20:53:02 +09:00
parent 4d77386026
commit 63b546e254
6 changed files with 7 additions and 7 deletions

View File

@@ -64,7 +64,7 @@ void BrokerRecvTask::run(void)
_light->blueLight(false); _light->blueLight(false);
if (CHK_SIGINT) if (CHK_SIGINT)
{ {
WRITELOG("\n%s %s stopped.", currentDateTime(), getTaskName()); WRITELOG("%s %s stopped.\n", currentDateTime(), getTaskName());
return; return;
} }
timeout.tv_sec = 0; timeout.tv_sec = 0;

View File

@@ -70,7 +70,7 @@ void BrokerSendTask::run()
if (ev->getEventType() == EtStop) if (ev->getEventType() == EtStop)
{ {
WRITELOG("\n%s %s stopped.", currentDateTime(), getTaskName()); WRITELOG("%s %s stopped.\n", currentDateTime(), getTaskName());
delete ev; delete ev;
return; return;
} }

View File

@@ -76,7 +76,7 @@ void ClientRecvTask::run()
if (CHK_SIGINT) if (CHK_SIGINT)
{ {
WRITELOG("\n%s %s stopped.", currentDateTime(), getTaskName()); WRITELOG("%s %s stopped.\n", currentDateTime(), getTaskName());
delete packet; delete packet;
return; return;
} }

View File

@@ -51,7 +51,7 @@ void ClientSendTask::run()
if (ev->getEventType() == EtStop || _gateway->IsStopping()) if (ev->getEventType() == EtStop || _gateway->IsStopping())
{ {
WRITELOG("\n%s %s stopped.", currentDateTime(), getTaskName()); WRITELOG("%s %s stopped.\n", currentDateTime(), getTaskName());
delete ev; delete ev;
break; break;
} }

View File

@@ -114,7 +114,7 @@ void PacketHandleTask::run()
if (ev->getEventType() == EtStop) if (ev->getEventType() == EtStop)
{ {
WRITELOG("\n%s %s stopped.", currentDateTime(), getTaskName()); WRITELOG("%s %s stopped.\n", currentDateTime(), getTaskName());
delete ev; delete ev;
return; return;
} }

View File

@@ -317,7 +317,7 @@ void Gateway::run(void)
/* Run Tasks until CTRL+C entered or Exception occurred */ /* Run Tasks until CTRL+C entered or Exception occurred */
MultiTaskProcess::run(); MultiTaskProcess::run();
WRITELOG("\n");
_stopFlg = true; _stopFlg = true;
/* stop Tasks */ /* stop Tasks */
@@ -334,7 +334,7 @@ void Gateway::run(void)
/* wait until all Task stop */ /* wait until all Task stop */
MultiTaskProcess::waitStop(); MultiTaskProcess::waitStop();
WRITELOG("\n\n%s MQTT-SN Gateway stopped.\n\n", currentDateTime()); WRITELOG("\n%s MQTT-SN Gateway stopped.\n\n", currentDateTime());
_lightIndicator.allLightOff(); _lightIndicator.allLightOff();
} }