diff --git a/mux.go b/mux.go index 9eac9d6..d75a069 100644 --- a/mux.go +++ b/mux.go @@ -40,6 +40,7 @@ func (mux *mux) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.WriteHeader(response.StatusCode) if response.Body != nil { + defer response.Body.Close() _, err := io.Copy(w, response.Body) if err != nil && err != io.EOF { mux.Logger.Error("Unable to copy body", zap.Error(err))