Fix missing flush in StreamCopyThread
commit3f143b8d6b5c20098e041e22be42216e668a4a0b
authorDmitry Neverov <dmitry.neverov@gmail.com>
Thu, 13 May 2010 16:50:44 +0000 (13 09:50 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Thu, 13 May 2010 16:58:18 +0000 (13 09:58 -0700)
tree764b921ab0cccfc1c51e8ca9020e04d2329f3757
parenta54e0bae687d4a3600fab87b1182d7303f097a92
Fix missing flush in StreamCopyThread

It is possible to miss flush() invocation in StreamCopyThread.
In this case some data will not be sent to remote host and we will
wait forever (or until timeout) in src.read().

Use a counter to keep track of the flush requests.

Change-Id: Ia818be9b109a1674d9e2a9c78e125ab248cfb75b
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/util/io/StreamCopyThread.java