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 bc85e6f60..291b53618 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 @@ class SshFetchConnection extends BasePackFetchConnection { public void close() { endOut(); + if (process != null) { + process.destroy(); + } if (errorThread != null) { try { errorThread.halt(); @@ -322,8 +325,6 @@ public void close() { } super.close(); - if (process != null) - process.destroy(); } } @@ -377,6 +378,9 @@ class SshPushConnection extends BasePackPushConnection { public void close() { endOut(); + if (process != null) { + process.destroy(); + } if (errorThread != null) { try { errorThread.halt(); @@ -388,8 +392,6 @@ public void close() { } super.close(); - if (process != null) - process.destroy(); } } }