MCPcopy
hub / github.com/caddyserver/caddy / Cleanup

Method Cleanup

modules/caddyhttp/reverseproxy/reverseproxy.go:441–450  ·  view source on GitHub ↗

Cleanup cleans up the resources made by h.

()

Source from the content-addressed store, hash-verified

439
440// Cleanup cleans up the resources made by h.
441func (h *Handler) Cleanup() error {
442 err := h.cleanupConnections()
443
444 // remove hosts from our config from the pool
445 for _, upstream := range h.Upstreams {
446 _, _ = hosts.Delete(upstream.String())
447 }
448
449 return err
450}
451
452// bodyNopCloserIfNotRead wraps a request body to prevent closing if not read, i.e., when
453// dialing to upstream fails.

Callers

nothing calls this directly

Calls 3

cleanupConnectionsMethod · 0.95
DeleteMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected