Browse Source

ssh: Kill the external process when we're done instead of waiting forever

Bug: 529463
Change-Id: Iaf6fe20a1c759ac5e91a2393d7bc40a94f859e84
Signed-off-by: Carsten Pfeiffer <carsten.pfeiffer@gebit.de>
stable-5.0
Carsten Pfeiffer 7 years ago
parent
commit
34bcb255ef
  1. 10
      org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java

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

@ -311,6 +311,9 @@ public class TransportGitSsh extends SshTransport implements PackTransport {
public void close() { public void close() {
endOut(); endOut();
if (process != null) {
process.destroy();
}
if (errorThread != null) { if (errorThread != null) {
try { try {
errorThread.halt(); errorThread.halt();
@ -322,8 +325,6 @@ public class TransportGitSsh extends SshTransport implements PackTransport {
} }
super.close(); super.close();
if (process != null)
process.destroy();
} }
} }
@ -377,6 +378,9 @@ public class TransportGitSsh extends SshTransport implements PackTransport {
public void close() { public void close() {
endOut(); endOut();
if (process != null) {
process.destroy();
}
if (errorThread != null) { if (errorThread != null) {
try { try {
errorThread.halt(); errorThread.halt();
@ -388,8 +392,6 @@ public class TransportGitSsh extends SshTransport implements PackTransport {
} }
super.close(); super.close();
if (process != null)
process.destroy();
} }
} }
} }

Loading…
Cancel
Save