diff options
author | John Cai <jcai@gitlab.com> | 2019-05-02 22:40:57 +0300 |
---|---|---|
committer | Paul Okstad <pokstad@gitlab.com> | 2019-05-02 22:40:57 +0300 |
commit | fecd986afba1dca30dcc642dc1908b3005dcf0e9 (patch) | |
tree | be6ee4144e38757200533db7252e1fa9bfc77650 | |
parent | 104efcb503c3d455ce4d45b92e52e9c8fbcd0746 (diff) |
Do not close the TTL channel twice
-rw-r--r-- | changelogs/unreleased/jc-do-not-close-ttl-channel.yml | 5 | ||||
-rw-r--r-- | internal/git/catfile/batch_cache.go | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/changelogs/unreleased/jc-do-not-close-ttl-channel.yml b/changelogs/unreleased/jc-do-not-close-ttl-channel.yml new file mode 100644 index 000000000..e66a72d58 --- /dev/null +++ b/changelogs/unreleased/jc-do-not-close-ttl-channel.yml @@ -0,0 +1,5 @@ +--- +title: Do not close the TTL channel twice +merge_request: 1235 +author: +type: fixed diff --git a/internal/git/catfile/batch_cache.go b/internal/git/catfile/batch_cache.go index b0db3b289..3b4714539 100644 --- a/internal/git/catfile/batch_cache.go +++ b/internal/git/catfile/batch_cache.go @@ -116,7 +116,6 @@ func (bc *BatchCache) Add(key CacheKey, b *Batch, ttl time.Duration) { if v, ok := bc.lru.Get(key); ok { existing := v.(*CacheItem) - close(existing.stopTTL) existing.batch.Close() bc.lru.Remove(key) } |