summaryrefslogtreecommitdiff
path: root/src/helpers/Watchdog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/helpers/Watchdog.cpp')
-rw-r--r--src/helpers/Watchdog.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/helpers/Watchdog.cpp b/src/helpers/Watchdog.cpp
index f5d85df7..2a26ee29 100644
--- a/src/helpers/Watchdog.cpp
+++ b/src/helpers/Watchdog.cpp
@@ -3,6 +3,9 @@
#include "config/ConfigManager.hpp"
CWatchdog::~CWatchdog() {
+ m_bExitThread = true;
+ m_bNotified = true;
+ m_cvWatchdogCondition.notify_all();
m_pWatchdog.reset();
}
@@ -22,6 +25,9 @@ CWatchdog::CWatchdog() {
pthread_kill(m_iMainThreadPID, SIGUSR1);
}
+ if (m_bExitThread)
+ break;
+
m_bWatching = false;
m_bNotified = false;
}