Reimplement the deferred update handling, this time in a more robust and
well-behaved manner.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4784 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx
index bcc7f23..30d9b6a 100644
--- a/common/rfb/VNCSConnectionST.cxx
+++ b/common/rfb/VNCSConnectionST.cxx
@@ -668,7 +668,11 @@
updates.enable_copyrect(cp.useCopyRect);
- server->checkUpdate();
+ // Fetch updates from server object, and see if we are allowed to send
+ // anything right now (the framebuffer might have changed in ways we
+ // haven't yet been informed of).
+ if (!server->checkUpdate())
+ return;
// Get the lists of updates. Prior to exporting the data to the `ui' object,
// getUpdateInfo() will normalize the `updates' object such way that its