Browse Source

Terminate StreamCopy threads in case of errors

Bug: 513554
Change-Id: I065836b8fc77ade6de92e4a809fcf770a4f793ec
Signed-off-by: Dmitry Neverov <dmitry.neverov@gmail.com>
stable-4.9
Dmitry Neverov 8 years ago committed by David Pursehouse
parent
commit
a0a8a6a3e4
  1. 1
      org.eclipse.jgit/src/org/eclipse/jgit/transport/JschSession.java
  2. 12
      org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java

1
org.eclipse.jgit/src/org/eclipse/jgit/transport/JschSession.java

@ -220,6 +220,7 @@ public class JschSession implements RemoteSession {
public void destroy() {
if (channel.isConnected())
channel.disconnect();
closeOutputStream();
}
@Override

12
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java

@ -283,12 +283,12 @@ public class TransportGitSsh extends SshTransport implements PackTransport {
init(process.getInputStream(), process.getOutputStream());
} catch (TransportException err) {
close();
throw err;
} catch (IOException err) {
close();
} catch (Throwable err) {
throw new TransportException(uri,
JGitText.get().remoteHungUpUnexpectedly, err);
} finally {
close();
}
try {
@ -341,12 +341,12 @@ public class TransportGitSsh extends SshTransport implements PackTransport {
init(process.getInputStream(), process.getOutputStream());
} catch (TransportException err) {
close();
throw err;
} catch (IOException err) {
close();
} catch (Throwable err) {
throw new TransportException(uri,
JGitText.get().remoteHungUpUnexpectedly, err);
} finally {
close();
}
try {

Loading…
Cancel
Save