Skip to content

Commit

Permalink
Pass the ctx value to make the race detector happy (#5201)
Browse files Browse the repository at this point in the history
  • Loading branch information
briankassouf authored and jefferai committed Aug 28, 2018
1 parent 3437e82 commit 8667143
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vault/request_handling.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8667143

Please sign in to comment.