From: Pierre Ossman Date: Fri, 29 Apr 2016 13:50:54 +0000 (+0200) Subject: Flush socket before checking buffer X-Git-Tag: v1.6.90~27^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=352d062e982ea38506756c04b9f4362d0f1ae892;p=tigervnc.git 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. --- 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;