diff options
author | Pavlo Strokov <pstrokov@gitlab.com> | 2020-05-12 19:24:46 +0300 |
---|---|---|
committer | Pavlo Strokov <pstrokov@gitlab.com> | 2020-05-12 19:24:46 +0300 |
commit | 60e9355f8d4836f738e408256f16154a3c6c32c2 (patch) | |
tree | 630025649516b6c34cd39794dffdab8761d1bffe | |
parent | d963864a4105909688f9627a7e34b53b31e84997 (diff) | |
parent | 26aa7aeca0c136f9ba3c0da09ccb155bd0b66be7 (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.go | 2 |
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") |