From dccb60ba35009812045d9006b3cc90adb6574e4d Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sun, 24 Sep 2023 12:53:06 -0700 Subject: [PATCH] Ignore IOCP where the event failed to deque. --- src/core/ev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/ev.c b/src/core/ev.c index f1989722..4b5e27f4 100644 --- a/src/core/ev.c +++ b/src/core/ev.c @@ -1535,7 +1535,11 @@ void janet_loop1_impl(int has_timeout, JanetTimestamp to) { } BOOL result = GetQueuedCompletionStatus(janet_vm.iocp, &num_bytes_transfered, &completionKey, &overlapped, (DWORD) waittime); - if (result || overlapped) { + if (!result) { + return; + } + + if (overlapped) { if (0 == completionKey) { /* Custom event */ JanetSelfPipeEvent *response = (JanetSelfPipeEvent *)(overlapped);