aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/helpers
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2023-09-29 17:33:26 +0100
committervaxerski <[email protected]>2023-09-29 17:33:26 +0100
commitab11bd20851c5bb99f0e164ee5b0ebe3888628c0 (patch)
tree201b9d0d8e20455accbb8cf678c26f0ad633d069 /src/helpers
parent27cd7ef0c94f3dc2d2038520da8d95063ae7f2a9 (diff)
downloadHyprland-ab11bd20851c5bb99f0e164ee5b0ebe3888628c0.tar.gz
Hyprland-ab11bd20851c5bb99f0e164ee5b0ebe3888628c0.zip
watchdog: remove thread on destroy
Diffstat (limited to 'src/helpers')
-rw-r--r--src/helpers/Watchdog.cpp4
-rw-r--r--src/helpers/Watchdog.hpp1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/helpers/Watchdog.cpp b/src/helpers/Watchdog.cpp
index 92f20dfb..f5d85df7 100644
--- a/src/helpers/Watchdog.cpp
+++ b/src/helpers/Watchdog.cpp
@@ -2,6 +2,10 @@
#include <signal.h>
#include "config/ConfigManager.hpp"
+CWatchdog::~CWatchdog() {
+ m_pWatchdog.reset();
+}
+
CWatchdog::CWatchdog() {
m_iMainThreadPID = pthread_self();
diff --git a/src/helpers/Watchdog.hpp b/src/helpers/Watchdog.hpp
index 1868bd0f..edbfb055 100644
--- a/src/helpers/Watchdog.hpp
+++ b/src/helpers/Watchdog.hpp
@@ -9,6 +9,7 @@ class CWatchdog {
public:
// must be called from the main thread
CWatchdog();
+ ~CWatchdog();
void startWatching();
void endWatching();