Fixed invalid event number.

This commit is contained in:
Armin Novak 2013-09-05 17:17:54 +02:00
parent f2bc161f13
commit 9a3b4ac6c2

View File

@ -817,11 +817,11 @@ static void* transport_client_thread(void* arg)
events[nCount++] = transport->stopEvent;
events[nCount] = transport->connectedEvent;
status = WaitForMultipleObjects(nCount, events, FALSE, INFINITE);
status = WaitForMultipleObjects(nCount + 1, events, FALSE, INFINITE);
if (status == WAIT_OBJECT_0)
break;
transport_get_read_handles(transport, (HANDLE*) events, &nCount);
transport_get_read_handles(transport, (HANDLE*) &events, &nCount);
status = WaitForMultipleObjects(nCount, events, FALSE, INFINITE);
if (status == WAIT_OBJECT_0)
break;