From 9c0bf311f93218e8f899cd3c6102868be18a4d1c Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Thu, 10 Oct 2019 15:38:30 -0600 Subject: Miscellaneous cleanups / comments --- modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go | 1 + modules/caddyhttp/reverseproxy/reverseproxy.go | 2 ++ 2 files changed, 3 insertions(+) (limited to 'modules/caddyhttp/reverseproxy') diff --git a/modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go b/modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go index 9df6585..eaf1f86 100644 --- a/modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go +++ b/modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go @@ -110,6 +110,7 @@ func (t Transport) RoundTrip(r *http.Request) (*http.Response, error) { fcgiBackend, err := DialContext(ctx, network, address) if err != nil { + // TODO: wrap in a special error type if the dial failed, so retries can happen if enabled return nil, fmt.Errorf("dialing backend: %v", err) } // fcgiBackend gets closed when response body is closed (see clientCloser) diff --git a/modules/caddyhttp/reverseproxy/reverseproxy.go b/modules/caddyhttp/reverseproxy/reverseproxy.go index a733d68..45c0690 100644 --- a/modules/caddyhttp/reverseproxy/reverseproxy.go +++ b/modules/caddyhttp/reverseproxy/reverseproxy.go @@ -243,6 +243,8 @@ func (h *Handler) Cleanup() error { close(h.HealthChecks.Active.stopChan) } + // TODO: Close keepalive connections on reload? https://github.com/caddyserver/caddy/pull/2507/files#diff-70219fd88fe3f36834f474ce6537ed26R762 + // remove hosts from our config from the pool for _, upstream := range h.Upstreams { hosts.Delete(upstream.dialInfo.String()) -- cgit v1.2.3