From 004e7ade8f5927e2be64684421711df618228918 Mon Sep 17 00:00:00 2001 From: motoki317 Date: Wed, 20 Apr 2022 21:20:58 +0900 Subject: [PATCH] Use empty context on graceful replacement call --- cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache.go b/cache.go index c5bb08a..c382fe1 100644 --- a/cache.go +++ b/cache.go @@ -145,7 +145,7 @@ retry: cl = &call[V]{} cl.wg.Add(1) c.calls[key] = cl - go c.set(ctx, cl, key) + go c.set(context.Background(), cl, key) // Use empty context so as not to be cancelled by the original context } c.stats.GraceHits++ c.mu.Unlock()