Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Strokov <pstrokov@gitlab.com>2020-05-12 19:24:46 +0300
committerPavlo Strokov <pstrokov@gitlab.com>2020-05-12 19:24:46 +0300
commit60e9355f8d4836f738e408256f16154a3c6c32c2 (patch)
tree630025649516b6c34cd39794dffdab8761d1bffe
parentd963864a4105909688f9627a7e34b53b31e84997 (diff)
parent26aa7aeca0c136f9ba3c0da09ccb155bd0b66be7 (diff)
Merge branch 'po-fix-file-leak-inforef' into 'master'
Fix info ref cache file leak Closes #2757 See merge request gitlab-org/gitaly!2160
-rw-r--r--internal/service/smarthttp/cache.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/service/smarthttp/cache.go b/internal/service/smarthttp/cache.go
index 93314f473..bff4c96a8 100644
--- a/internal/service/smarthttp/cache.go
+++ b/internal/service/smarthttp/cache.go
@@ -57,6 +57,8 @@ func tryCache(ctx context.Context, in *gitalypb.InfoRefsRequest, w io.Writer, mi
stream, err := infoRefCache.GetStream(ctx, in.GetRepository(), in)
switch err {
case nil:
+ defer stream.Close()
+
countHit()
logger.Info("cache hit for UploadPack response")