From ee90cef6eec289be77b0b01ef730ee8d865252d3 Mon Sep 17 00:00:00 2001 From: ttsuki Date: Fri, 2 Aug 2019 06:27:29 +0900 Subject: [PATCH] Fixed crash on destructing NotificationRequestPool --- src/NotificationRequestPool.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/NotificationRequestPool.cpp b/src/NotificationRequestPool.cpp index 2dd9616..d911eee 100644 --- a/src/NotificationRequestPool.cpp +++ b/src/NotificationRequestPool.cpp @@ -107,6 +107,13 @@ void NotificationRequestPool::operator()() continue; } + // handles are closed...? + if (ret == WAIT_FAILED) + { + // exits function (terminates thread) + break; + } + // index of the request which just got completed const auto index = ret - WAIT_OBJECT_0; // grab associated request