From 8187bc48dc8680ad9bfa7658c847b5d85ab89e3f Mon Sep 17 00:00:00 2001 From: Trent Houliston Date: Thu, 15 Aug 2024 11:26:16 +1000 Subject: [PATCH] . --- src/extension/IOController_Windows.ipp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/extension/IOController_Windows.ipp b/src/extension/IOController_Windows.ipp index 78699be4..478297fd 100644 --- a/src/extension/IOController_Windows.ipp +++ b/src/extension/IOController_Windows.ipp @@ -144,7 +144,7 @@ namespace extension { // Create an event to use for the notifier (used for getting out of WSAWaitForMultipleEvents()) notifier.notifier = WSACreateEvent(); - if (notifier == WSA_INVALID_EVENT) { + if (notifier.notifier == WSA_INVALID_EVENT) { throw std::system_error(WSAGetLastError(), std::system_category(), "WSACreateEvent() for notifier failed"); } @@ -233,13 +233,14 @@ namespace extension { } // Wait for events + DWORD event_index = 0; /*mutex scope*/ { const std::lock_guard lock(notifier.mutex); - auto event_index = WSAWaitForMultipleEvents(static_cast(watches.size()), - watches.data(), - false, - WSA_INFINITE, - false); + event_index = WSAWaitForMultipleEvents(static_cast(watches.size()), + watches.data(), + false, + WSA_INFINITE, + false); } // Check if the return value is an event in our list