Skip to content

Commit

Permalink
fix: honor request context in readiness check (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
enocom authored Feb 16, 2023
1 parent 38d2f7a commit 96ec2aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/healthcheck/healthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ var errNotStarted = errors.New("proxy is not started")
// that the proxy has not reached maximum connections, and that all connections
// are healthy.
func (c *Check) HandleReadiness(w http.ResponseWriter, req *http.Request) {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithCancel(req.Context())
defer cancel()

select {
Expand Down

0 comments on commit 96ec2aa

Please sign in to comment.