From b66c53ff5f4616c9f879b13aec2d6b1874d16dde Mon Sep 17 00:00:00 2001 From: Sam Batschelet Date: Fri, 13 Mar 2020 17:53:41 -0400 Subject: [PATCH] proxy/grpcproxy: add return on error for metrics handler Signed-off-by: Sam Batschelet --- proxy/grpcproxy/metrics.go | 1 + 1 file changed, 1 insertion(+) diff --git a/proxy/grpcproxy/metrics.go b/proxy/grpcproxy/metrics.go index fcab53d84e0..cab29c529e7 100644 --- a/proxy/grpcproxy/metrics.go +++ b/proxy/grpcproxy/metrics.go @@ -89,6 +89,7 @@ func HandleMetrics(mux *http.ServeMux, c *http.Client, eps []string) { resp, err := c.Get(target) if err != nil { http.Error(w, "Internal server error", http.StatusInternalServerError) + return } defer resp.Body.Close() w.Header().Set("Content-Type", "text/plain; version=0.0.4")