Cleanup cleans up the resources made by h.
()
| 439 | |
| 440 | // Cleanup cleans up the resources made by h. |
| 441 | func (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. |
nothing calls this directly
no test coverage detected