jgit/org.eclipse.jgit
Shawn O. Pearce 0dc93a2f4a Fix EGit deadlock listing branches of SSH remote
When listing branches, EGit only reads the advertisement and
then disconnects.  When it closes down the pack channel the remote
side is waiting for the client to send our list of commands, or a
flush-pkt to let it know there is nothing to do.

However if an error thread is open watching the SSH stderr stream,
we ask for it to finish before we send the flush-pkt.  Unfortunately
the thread won't terminate until the main output stream closes,
which is waiting for the flush-pkt.  A classic network deadlock.

If the output stream needs a flush-pkt we send it before we wait
for the error stream to close.  If the flush-pkt is rejected, we
close down the output stream early, assuming that the remote side
is broken and we will get error information soon.

Change-Id: I8d078a339077756220c113f49d206b1bf295d434
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-03-20 19:18:14 -07:00
..
.settings Adding PDE API Tools nature to JGit 2010-01-16 10:00:30 -06:00
META-INF Qualify post-0.7.0 builds 2010-03-20 18:58:37 -07:00
findBugs Initial JGit contribution to eclipse.org 2009-09-29 16:47:03 -07:00
src/org/eclipse/jgit Fix EGit deadlock listing branches of SSH remote 2010-03-20 19:18:14 -07:00
.classpath Partial revert "Switch build to Apache Felix maven-bundle-plugin" 2010-01-10 15:59:03 +01:00
.fbprefs Initial JGit contribution to eclipse.org 2009-09-29 16:47:03 -07:00
.gitignore Finish removing Apache Felix maven-bundle-plugin 2010-01-12 11:46:55 -08:00
.project Adding PDE API Tools nature to JGit 2010-01-16 10:00:30 -06:00
about.html Adding some Eclipse-related legal files to JGit 2010-02-03 15:18:06 -06:00
build.properties Adding some Eclipse-related legal files to JGit 2010-02-03 15:18:06 -06:00
plugin.properties Correct bundle, provider names to be consistent 2010-01-23 11:42:15 -08:00
pom.xml Qualify post-0.7.0 builds 2010-03-20 18:58:37 -07:00