From 4d828e15da7149e9a7ec4a596e0ea244f62bbd68 Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Sun, 26 Jul 2020 00:57:59 -0700 Subject: [PATCH] Fixed bug where if no items are in the chain or the handle list, the timeout was left at 0, causing high CPU utilization on Windows. --- microstack/ILibParsers.c | 1 + 1 file changed, 1 insertion(+) diff --git a/microstack/ILibParsers.c b/microstack/ILibParsers.c index 5292c7c..53c8dd3 100644 --- a/microstack/ILibParsers.c +++ b/microstack/ILibParsers.c @@ -2131,6 +2131,7 @@ void ILibChain_SetupWindowsWaitObject(HANDLE* waitList, int *waitListCount, stru if (readset->fd_count == 0 && writeset->fd_count == 0 && ILibLinkedList_GetNode_Head(handleList) == NULL) { *waitListCount = 0; + *timeout = tv->tv_sec * 1000; return; } int chkIndex;