From 352d062e982ea38506756c04b9f4362d0f1ae892 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 29 Apr 2016 15:50:54 +0200 Subject: [PATCH] Flush socket before checking buffer There might be stuff lingering in the buffer simply because flush() hasn't been called in a while, rather than because the transport is congested. --- common/rfb/VNCSConnectionST.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx index 3a072ef0..97f7d286 100644 --- a/common/rfb/VNCSConnectionST.cxx +++ b/common/rfb/VNCSConnectionST.cxx @@ -832,6 +832,7 @@ bool VNCSConnectionST::isCongested() int offset; // Stuff still waiting in the send buffer? + sock->outStream().flush(); if (sock->outStream().bufferUsage() > 0) return true; -- 2.39.5