Skip to content

Commit

Permalink
Use empty context on graceful replacement call
Browse files Browse the repository at this point in the history
  • Loading branch information
motoki317 committed Apr 20, 2022
1 parent 6d4dab2 commit 004e7ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 004e7ad

Please sign in to comment.