From af1527b27610da9339c27439886766b9e65da2b9 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Thu, 28 Jun 2012 10:29:12 -0500 Subject: [PATCH] timers: fix over repeated connects. With tight we can't ever use FBU.rects being 0 as an indication of a full frame having been drawn. --- include/rfb.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/rfb.js b/include/rfb.js index 6d8d4e2d..00fb7d88 100644 --- a/include/rfb.js +++ b/include/rfb.js @@ -894,6 +894,7 @@ init_msg = function() { response = response.concat(clientEncodings()); response = response.concat(fbUpdateRequests()); timing.fbu_rt_start = (new Date()).getTime(); + timing.pixels = 0; ws.send(response); /* Start pushing/polling */ @@ -1044,7 +1045,7 @@ framebufferUpdate = function() { timing.pixels += FBU.width * FBU.height; } - if (FBU.rects === 0 || (timing.pixels >= (fb_width * fb_height))) { + if (timing.pixels >= (fb_width * fb_height)) { if (((FBU.width === fb_width) && (FBU.height === fb_height)) || (timing.fbu_rt_start > 0)) {