Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

fix: set to OK if recv flag is TRUE (#9244)

fufesou04c0f66ca983
diff --git a/libs/clipboard/src/windows/wf_cliprdr.c b/libs/clipboard/src/windows/wf_cliprdr.c
index 5bca54052..1f65b1913 100644
--- a/libs/clipboard/src/windows/wf_cliprdr.c
+++ b/libs/clipboard/src/windows/wf_cliprdr.c
@@ -1462,6 +1462,8 @@ UINT wait_response_event(UINT32 connID, wfClipboard *clipboard, HANDLE event, BO
// The data has been received, but the event is still not signaled.
// We just skip the rest of the waiting and reset the flag.
*recvedFlag = FALSE;
+ // Explicitly set the waitRes to WAIT_OBJECT_0, because we have received the data.
+ waitRes = WAIT_OBJECT_0;
} else {
// The data has not been received yet, we should continue to wait.
continue;