From 86671436d6f03c7f2849a7e432246b00b12bf84a Mon Sep 17 00:00:00 2001 From: Brian Kassouf Date: Mon, 27 Aug 2018 18:21:54 -0700 Subject: [PATCH] Pass the ctx value to make the race detector happy (#5201) --- vault/request_handling.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vault/request_handling.go b/vault/request_handling.go index b95dd3b9f81ba..8b5b8d5b13e46 100644 --- a/vault/request_handling.go +++ b/vault/request_handling.go @@ -293,13 +293,13 @@ func (c *Core) HandleRequest(httpCtx context.Context, req *logical.Request) (res ctx, cancel := context.WithCancel(c.activeContext) defer cancel() - go func() { + go func(ctx context.Context, httpCtx context.Context) { select { case <-ctx.Done(): case <-httpCtx.Done(): cancel() } - }() + }(ctx, httpCtx) // Allowing writing to a path ending in / makes it extremely difficult to // understand user intent for the filesystem-like backends (kv,