Fix rdpsnd number of event handles

This commit is contained in:
Armin Novak 2021-09-20 08:04:29 +02:00 committed by akallabeth
parent 695e38398d
commit cbd30544f8

View File

@ -229,13 +229,15 @@ out_free:
static DWORD WINAPI rdpsnd_server_thread(LPVOID arg)
{
DWORD nCount = 0, status;
HANDLE events[4] = { 0 };
HANDLE events[2] = { 0 };
RdpsndServerContext* context = (RdpsndServerContext*)arg;
UINT error = CHANNEL_RC_OK;
WINPR_ASSERT(context);
events[nCount++] = context->priv->channelEvent;
events[nCount++] = context->priv->StopEvent;
WINPR_ASSERT(nCount <= ARRAYSIZE(events));
while (TRUE)
{
status = WaitForMultipleObjects(nCount, events, FALSE, INFINITE);