From b00a608af7a5e42c819a6cd15bb2ff7b8cce9f65 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. --- core/rfb.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/core/rfb.js b/core/rfb.js index a7bceebe..3665583d 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -1828,11 +1828,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); }