close response body in heartbeat (#1637)

This commit is contained in:
blotus 2022-07-06 14:50:54 +02:00 committed by GitHub
parent 2c0c7225f5
commit 5c1c941851
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,6 +43,7 @@ func (h *HeartBeatService) StartHeartBeat(ctx context.Context, t *tomb.Tomb) {
log.Errorf("heartbeat error : %s", err)
continue
}
resp.Response.Body.Close()
if resp.Response.StatusCode != http.StatusOK {
log.Errorf("heartbeat unexpected return code : %d", resp.Response.StatusCode)
continue