Skip to content

Commit 563db52

Browse files
committed
Fix issue where the body was not close when doing http request
1 parent 5a30dba commit 563db52

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/utils/utils.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ func GetBodyInWebsite(url string, proxy func(*http.Request) (*url.URL, error), h
125125
return "", -1, err
126126
}
127127
body, _ := ioutil.ReadAll(resp.Body)
128+
resp.Body.Close()
128129
return string(body), resp.StatusCode, nil
129130
}
130131

0 commit comments

Comments
 (0)