Fix SSH deadlock during OutOfMemoryError
commit2e961989e42b1fe7e8bd9eaa7a3d2e88a0d1d001
authorShawn O. Pearce <spearce@spearce.org>
Sun, 16 May 2010 00:01:49 +0000 (15 17:01 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Wed, 19 May 2010 18:43:42 +0000 (19 11:43 -0700)
tree97d8b4f2f80706f0edc3192dc8eefb4e51abe7c3
parentb3247ba5244d95e0d2c850a3fa1f69668a5790f5
Fix SSH deadlock during OutOfMemoryError

In close() method of SshFetchConnection and SshPushConnection
errorThread.join() can wait forever if JSch will not close the
channel's error stream.  Join with a timeout, and interrupt the
copy thread if its blocked on data that will never arrive.

Bug: 312863
Change-Id: I763081267653153eed9cd7763a015059338c2df8
Reported-by: Dmitry Neverov <dmitry.neverov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java
org.eclipse.jgit/src/org/eclipse/jgit/util/io/StreamCopyThread.java