Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
TrentHouliston committed Aug 15, 2024
1 parent 1d8e0e9 commit 8187bc4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/extension/IOController_Windows.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down Expand Up @@ -233,13 +233,14 @@ namespace extension {
}

// Wait for events
DWORD event_index = 0;
/*mutex scope*/ {
const std::lock_guard<std::mutex> lock(notifier.mutex);
auto event_index = WSAWaitForMultipleEvents(static_cast<DWORD>(watches.size()),
watches.data(),
false,
WSA_INFINITE,
false);
event_index = WSAWaitForMultipleEvents(static_cast<DWORD>(watches.size()),
watches.data(),
false,
WSA_INFINITE,
false);
}

// Check if the return value is an event in our list
Expand Down

0 comments on commit 8187bc4

Please sign in to comment.