From d9f75e8bb2af7307ce1d6e0a7376eb5ebe583ae4 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Wed, 22 Feb 2023 20:36:39 +0100 Subject: [PATCH] If tryLock fails to get the lock another gc has it Change-Id: Ifd3bbcc5e0591883b774d23256949a83010ea134 --- .../src/org/eclipse/jgit/internal/storage/file/GC.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 7feb50688..f25feee8f 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 @@ -1650,7 +1650,7 @@ boolean lock() throws IOException { channel = f.getChannel(); lock = channel.tryLock(); if (lock == null || !lock.isValid()) { - failedToLock(); + gcAlreadyRunning(); return false; } channel.write(ByteBuffer