From 106967515ab5dffc1abca876b12a38e86e2a78bb Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 7 Feb 2018 10:56:06 +0100 Subject: [PATCH] Cleaner TS input shutdown --- src/input/input_ts.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/input/input_ts.cpp b/src/input/input_ts.cpp index 23c4859b..768d360a 100755 --- a/src/input/input_ts.cpp +++ b/src/input/input_ts.cpp @@ -495,6 +495,7 @@ namespace Mist { if (statsPage.getData()){ if (!statsPage.isAlive()){ config->is_active = false; + statsPage.finish(); return "received shutdown request from controller"; } IPC::statExchange tmpEx(statsPage.getData()); @@ -516,6 +517,7 @@ namespace Mist { if (hasStarted && !threadTimer.size()){ if (!isAlwaysOn()){ config->is_active = false; + statsPage.finish(); return "no active threads and we had input in the past"; }else{ hasStarted = false; @@ -546,12 +548,14 @@ namespace Mist { if (Util::bootSecs() - noDataSince > 20){ if (!isAlwaysOn()){ config->is_active = false; + statsPage.finish(); return "No packets received for 20 seconds - terminating"; }else{ noDataSince = Util::bootSecs(); } } } + statsPage.finish(); return "received shutdown request"; }