Skip to content

Commit

Permalink
Close HTTP request to avoid memory leaks or too many open FDs
Browse files Browse the repository at this point in the history
  • Loading branch information
topfunky committed Aug 17, 2018
1 parent 6453356 commit 3fd0ed3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions services/dashboard-service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func getAndParseCount() (Count, error) {
return Count{}, readErr
}

defer res.Body.Close()
return parseCount(body)
}

Expand Down

0 comments on commit 3fd0ed3

Please sign in to comment.