From 72060e59b473b6c1a95042afa68d2f23b99315ef Mon Sep 17 00:00:00 2001 From: "Jerry (Xinyu Hou)" Date: Fri, 12 Jun 2015 11:18:29 -0700 Subject: [PATCH] Fixed send clipboard thread time issue #4749 --- src/lib/client/Client.cpp | 1 + src/lib/server/Server.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/lib/client/Client.cpp b/src/lib/client/Client.cpp index 52258d69..ad586809 100644 --- a/src/lib/client/Client.cpp +++ b/src/lib/client/Client.cpp @@ -273,6 +273,7 @@ Client::leave() if (m_sendClipboardThread != NULL) { StreamChunker::interruptClipboard(); + m_sendClipboardThread->wait(); m_sendClipboardThread = NULL; } diff --git a/src/lib/server/Server.cpp b/src/lib/server/Server.cpp index 4420b2dd..1f04489c 100644 --- a/src/lib/server/Server.cpp +++ b/src/lib/server/Server.cpp @@ -509,6 +509,8 @@ Server::switchScreen(BaseClientProxy* dst, // clipboard data could be corrupted on the other side if (m_sendClipboardThread != NULL) { StreamChunker::interruptClipboard(); + m_sendClipboardThread->wait(); + m_sendClipboardThread = NULL; } // send the clipboard data to new active screen