aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pipkin.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/pipkin.go b/pipkin.go
index 8996f56..f8896ce 100644
--- a/pipkin.go
+++ b/pipkin.go
@@ -177,6 +177,7 @@ func (pk *Pipkin) fetch(w http.ResponseWriter, r *http.Request) {
http.Error(w, http.StatusText(http.StatusNotFound), http.StatusNotFound)
return
}
+ defer resp.Body.Close()
statusOK := resp.StatusCode >= 200 && resp.StatusCode < 400
pk.log.Infof("%s %d %s %s %s\n", r.Method, resp.StatusCode, hostStr,
host.Bucket, key)