diff options
Diffstat (limited to 'src/helpers/Watchdog.cpp')
| -rw-r--r-- | src/helpers/Watchdog.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/helpers/Watchdog.cpp b/src/helpers/Watchdog.cpp index afb8a946..b9f654da 100644 --- a/src/helpers/Watchdog.cpp +++ b/src/helpers/Watchdog.cpp @@ -7,7 +7,9 @@ CWatchdog::~CWatchdog() { m_bExitThread = true; m_bNotified = true; m_cvWatchdogCondition.notify_all(); - m_pWatchdog.reset(); + + if (m_pWatchdog && m_pWatchdog->joinable()) + m_pWatchdog->join(); } CWatchdog::CWatchdog() { @@ -33,8 +35,6 @@ CWatchdog::CWatchdog() { m_bNotified = false; } }); - - m_pWatchdog->detach(); } void CWatchdog::startWatching() { |
