From dd67519cc4b92f8b249fbc4f582e2dc12673f356 Mon Sep 17 00:00:00 2001 From: Traun Leyden <traun.leyden@gmail.com> Date: Fri, 27 Jan 2017 08:14:57 -0800 Subject: [PATCH] Fix attempt for reported connection buildup Regarding https://github.com/golang/go/issues/6785#issuecomment-275669472 --- watchdog/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/watchdog/main.go b/watchdog/main.go index 07010401..35e0dd4a 100644 --- a/watchdog/main.go +++ b/watchdog/main.go @@ -29,6 +29,7 @@ func makeRequestHandler(config *WatchdogConfig) func(http.ResponseWriter, *http. writer, _ := targetCmd.StdinPipe() res, _ := ioutil.ReadAll(r.Body) + defer r.Body.Close() writer.Write(res) writer.Close() -- GitLab