From 499b251716bd36ef25e0e92bb846559379142ca9 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 15 Feb 2019 13:14:36 +0100 Subject: [PATCH] Remove error handling in clientCutText() It is not necessary as Websock.flush() is guaranteed to succeed and give us some space. It also remove the call to _fail(), which was invalid at this place as clientCutText() is not a method on RFB. --- kasmweb/core/rfb.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/kasmweb/core/rfb.js b/kasmweb/core/rfb.js index d9d76e6..8d87660 100644 --- a/kasmweb/core/rfb.js +++ b/kasmweb/core/rfb.js @@ -2024,11 +2024,6 @@ RFB.messages = { while (remaining > 0) { let flushSize = Math.min(remaining, (sock._sQbufferSize - sock._sQlen)); - if (flushSize <= 0) { - this._fail("Clipboard contents could not be sent"); - break; - } - for (let i = 0; i < flushSize; i++) { buff[sock._sQlen + i] = text.charCodeAt(textOffset + i); }