[channels,rdp2tcp] only reset event if signalled

This commit is contained in:
akallabeth 2022-12-09 11:27:17 +01:00 committed by akallabeth
parent f553d453b8
commit dfcd168af6

View File

@ -174,7 +174,8 @@ static DWORD WINAPI copyThread(void* data)
handles[0] = plugin->writeComplete;
handles[1] = freerdp_abort_event(plugin->channelEntryPoints.context);
status = WaitForMultipleObjects(2, handles, FALSE, INFINITE);
ResetEvent(plugin->writeComplete);
if (status == WAIT_OBJECT_0)
ResetEvent(plugin->writeComplete);
}
fail: