mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-06 22:40:31 -05:00
reverseproxy: Abort active health checks on context cancellation
This commit is contained in:
parent
4940325844
commit
724b74d981
1 changed files with 2 additions and 3 deletions
|
@ -216,9 +216,8 @@ func (h *Handler) doActiveHealthCheck(dialInfo DialInfo, hostAddr string, host H
|
||||||
u.Host = net.JoinHostPort(host, portStr)
|
u.Host = net.JoinHostPort(host, portStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// attach dialing information to this request - TODO: use caddy.Context's context
|
// attach dialing information to this request
|
||||||
// so it can be canceled on config reload
|
ctx := h.ctx.Context
|
||||||
ctx := context.Background()
|
|
||||||
ctx = context.WithValue(ctx, caddy.ReplacerCtxKey, caddy.NewReplacer())
|
ctx = context.WithValue(ctx, caddy.ReplacerCtxKey, caddy.NewReplacer())
|
||||||
ctx = context.WithValue(ctx, caddyhttp.VarsCtxKey, map[string]interface{}{
|
ctx = context.WithValue(ctx, caddyhttp.VarsCtxKey, map[string]interface{}{
|
||||||
dialInfoVarKey: dialInfo,
|
dialInfoVarKey: dialInfo,
|
||||||
|
|
Loading…
Reference in a new issue