Permalink
Browse files

Added Body.Close() after outbound request to prevent memory leak

  • Loading branch information...
robtuley committed Feb 27, 2015
1 parent acfdfc9 commit dd379801bbed03881d6cf714639a56101261ef59
Showing with 2 additions and 0 deletions.
  1. +2 −0 batchpost.go
@@ -61,6 +61,8 @@ func batchPoster(url string) {
log.Println("error:> ", err)
return
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
log.Println("error:> status code ", resp.StatusCode)
return

0 comments on commit dd37980

Please sign in to comment.