mirror of
https://github.com/debauchee/barrier.git
synced 2026-07-18 03:51:10 +08:00
Add keepAlive message before send file/clipboard data #4768
This commit is contained in:
committed by
Xinyu Hou
parent
5661a41d42
commit
b5b2cdfade
@@ -50,6 +50,12 @@ ClientProxy1_6::setClipboard(ClipboardID id, const IClipboard* clipboard)
|
||||
if (m_clipboard[id].m_dirty) {
|
||||
// this clipboard is now clean
|
||||
m_clipboard[id].m_dirty = false;
|
||||
|
||||
// add keep alive message before we do clipboard copy
|
||||
// in case there is a big data inside and time that would
|
||||
// comsume will cause connecton being dropped
|
||||
keepAlive();
|
||||
|
||||
Clipboard::copy(&m_clipboard[id].m_clipboard, clipboard);
|
||||
|
||||
String data = m_clipboard[id].m_clipboard.marshall();
|
||||
@@ -66,6 +72,9 @@ ClientProxy1_6::setClipboard(ClipboardID id, const IClipboard* clipboard)
|
||||
void
|
||||
ClientProxy1_6::handleClipboardSendingEvent(const Event& event, void*)
|
||||
{
|
||||
// add keep alive message before we send each clipboard data
|
||||
keepAlive();
|
||||
|
||||
ClipboardChunk::send(getStream(), event.getData());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user