diff options
author | Carsten Pfeiffer <carsten.pfeiffer@gebit.de> | 2018-05-02 17:40:30 +0200 |
---|---|---|
committer | Carsten Pfeiffer <carsten.pfeiffer@gebit.de> | 2018-05-02 17:41:39 +0200 |
commit | 34bcb255ef7cec96efc3c73a270eaec97e543a0a (patch) | |
tree | dee75669251c0b80958846289d359316d6f9d53b | |
parent | 0a35e5f25bb6b865b90678f0589f97407f461f9c (diff) | |
download | jgit-34bcb255ef7cec96efc3c73a270eaec97e543a0a.tar.gz jgit-34bcb255ef7cec96efc3c73a270eaec97e543a0a.zip |
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>
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java index bc85e6f60f..291b536184 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java @@ -311,6 +311,9 @@ public class TransportGitSsh extends SshTransport implements PackTransport { public void close() { endOut(); + if (process != null) { + process.destroy(); + } if (errorThread != null) { try { errorThread.halt(); @@ -322,8 +325,6 @@ public class TransportGitSsh extends SshTransport implements PackTransport { } super.close(); - if (process != null) - process.destroy(); } } @@ -377,6 +378,9 @@ public class TransportGitSsh extends SshTransport implements PackTransport { public void close() { endOut(); + if (process != null) { + process.destroy(); + } if (errorThread != null) { try { errorThread.halt(); @@ -388,8 +392,6 @@ public class TransportGitSsh extends SshTransport implements PackTransport { } super.close(); - if (process != null) - process.destroy(); } } } |