From c13df5ae678f97e62f93bd49adcdb2f7e678e2de Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 15 Feb 2019 10:23:32 +0100 Subject: [PATCH] Fix version handshake to handle slow data --- core/rfb.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/rfb.js b/core/rfb.js index 39683cbd..49f06380 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -785,8 +785,8 @@ export default class RFB extends EventTargetMixin { // Message Handlers _negotiate_protocol_version() { - if (this._sock.rQlen < 12) { - return this._fail("Received incomplete protocol version."); + if (this._sock.rQwait("version", 12)) { + return false; } const sversion = this._sock.rQshiftStr(12).substr(4, 7);