From c7449d468548be2583df9f8991d89e8c1ac07c59 Mon Sep 17 00:00:00 2001 From: Weston Schmidt Date: Tue, 22 Aug 2017 14:11:11 -0700 Subject: [PATCH] Remove un-needed closures. --- src/caduceus/http.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/caduceus/http.go b/src/caduceus/http.go index 29d9b705..2181a5eb 100644 --- a/src/caduceus/http.go +++ b/src/caduceus/http.go @@ -20,7 +20,6 @@ type ServerHandler struct { } func (sh *ServerHandler) ServeHTTP(response http.ResponseWriter, request *http.Request) { - defer request.Body.Close() sh.Info("Receiving incoming request...") @@ -108,7 +107,6 @@ type ProfileHandler struct { // ServeHTTP method of ProfileHandler will output the most recent messages // that the main handler has successfully dealt with func (ph *ProfileHandler) ServeHTTP(response http.ResponseWriter, request *http.Request) { - defer request.Body.Close() ph.Info("Receiving request for server stats...") stats := ph.profilerData.Report()