diff options
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java index 29ef084830..2e0ed16a55 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java @@ -305,11 +305,9 @@ public class RepositoryCache { private void unregisterAndCloseRepository(final Key location, Repository db) { synchronized (lockFor(location)) { - if (isExpired(db)) { - Repository oldDb = unregisterRepository(location); - if (oldDb != null) { - oldDb.close(); - } + Repository oldDb = unregisterRepository(location); + if (oldDb != null) { + oldDb.doClose(); } } } |