summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2017-07-07 00:58:28 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2019-03-03 18:35:04 +0100
commit882fed0d96c533513c43ae77aaff9cc07b94012c (patch)
tree69ccfa70c9860cba440c7fd1e63b462d6cacf274 /org.eclipse.jgit
parent436c99ce5946f31f06b8704b1fd33136f39dc814 (diff)
downloadjgit-882fed0d96c533513c43ae77aaff9cc07b94012c.tar.gz
jgit-882fed0d96c533513c43ae77aaff9cc07b94012c.zip
Cancel gc if thread was interrupted
see https://groups.google.com/d/msg/repo-discuss/oDB2rl3doDc/tFEh5Xt0CAAJ Change-Id: Ia6d4631c64e065d8b9b09e0b45e7a9ea8ac3f41d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
index 7bfec3fd91..015d44e87f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
@@ -1270,7 +1270,7 @@ public class GC {
}
private void checkCancelled() throws CancelledException {
- if (pm.isCancelled()) {
+ if (pm.isCancelled() || Thread.currentThread().isInterrupted()) {
throw new CancelledException(JGitText.get().operationCanceled);
}
}