[channels,rdp2tcp] only reset event if signalled
@@ -174,6 +174,7 @@ static DWORD WINAPI copyThread(void* data)
handles[0] = plugin->writeComplete;
handles[1] = freerdp_abort_event(plugin->channelEntryPoints.context);
status = WaitForMultipleObjects(2, handles, FALSE, INFINITE);
+ if (status == WAIT_OBJECT_0)
ResetEvent(plugin->writeComplete);
}
