Skip to content

Commit fc2e58a

Browse files
authored
Merge pull request #68 from SokoloffA/master
Fix: Socket leaks if server returns RateLimitExceededStatus status.
2 parents 69154c9 + 670a374 commit fc2e58a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

exporter/http.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ func getHTTPResponse(url string, token string) (*http.Response, error) {
152152

153153
// check rate limit exceeded.
154154
if resp.Status == RateLimitExceededStatus {
155+
resp.Body.Close()
155156
return nil, fmt.Errorf("%s", resp.Status)
156157
}
157158

0 commit comments

Comments
 (0)