From d9f4ab45e2bfba2baf3d454d659f1776b5ea69a9 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Sat, 26 Nov 2016 13:41:34 +0100 Subject: [PATCH] daemonManager: wait for daemon stop on app close --- src/daemon/DaemonManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/daemon/DaemonManager.cpp b/src/daemon/DaemonManager.cpp index 3769302a..b84a0fa2 100644 --- a/src/daemon/DaemonManager.cpp +++ b/src/daemon/DaemonManager.cpp @@ -136,4 +136,8 @@ void DaemonManager::closing() { qDebug() << __FUNCTION__; stop(); + // Wait for daemon to stop before exiting (max 10 secs) + if(initialized){ + m_daemon->waitForFinished(10000); + } }