1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 15:53:55 +00:00

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.

This commit is contained in:
Bryan Roe
2020-07-26 00:57:59 -07:00
parent a45f5f07c8
commit 4d828e15da

View File

@@ -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) if (readset->fd_count == 0 && writeset->fd_count == 0 && ILibLinkedList_GetNode_Head(handleList) == NULL)
{ {
*waitListCount = 0; *waitListCount = 0;
*timeout = tv->tv_sec * 1000;
return; return;
} }
int chkIndex; int chkIndex;