summaryrefslogtreecommitdiffstats
path: root/src/Root.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Root.cpp')
-rw-r--r--src/Root.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/Root.cpp b/src/Root.cpp
index 07b7ddb60..1a39b09a5 100644
--- a/src/Root.cpp
+++ b/src/Root.cpp
@@ -327,6 +327,17 @@ void cRoot::Start(std::unique_ptr<cSettingsRepositoryInterface> a_OverridesRepo)
+void cRoot::StopServer()
+{
+ m_TerminateEventRaised = true;
+ m_StopEvent.Set();
+ m_InputThreadRunFlag.clear();
+}
+
+
+
+
+
void cRoot::LoadGlobalSettings()
{
// Nothing needed yet
@@ -655,9 +666,7 @@ void cRoot::ExecuteConsoleCommand(const AString & a_Cmd, cCommandOutputCallback
// Some commands are built-in:
if (a_Cmd == "stop")
{
- m_TerminateEventRaised = true;
- m_StopEvent.Set();
- m_InputThreadRunFlag.clear();
+ StopServer();
return;
}
else if (a_Cmd == "restart")