fix memory leak: apparently we must close contexts to release JGit related resources
authorPavel Sher <pavel.sher@jetbrains.com>
Wed, 21 Nov 2018 18:52:19 +0000 (19:52 +0100)
committerPavel Sher <pavel.sher@jetbrains.com>
Wed, 21 Nov 2018 18:52:19 +0000 (19:52 +0100)
git-server-tc/src/jetbrains/buildServer/buildTriggers/vcs/git/GitClonesUpdater.java

index 8eb464d5c606f85763ee129101774692eb8e1374..004cf68c6c9d11289a6e0cc7b1704a754d5e68e6 100644 (file)
@@ -98,6 +98,8 @@ public class GitClonesUpdater {
         });
       } catch (VcsException e1) {
         Loggers.VCS.warnAndDebugDetails("Could not update local clone for: " + LogUtil.describe(root), e1);
+      } finally {
+        context.close();
       }
     }
   }