From 5c1c941851bff0793100b996550f5001c0cd92d6 Mon Sep 17 00:00:00 2001 From: blotus Date: Wed, 6 Jul 2022 14:50:54 +0200 Subject: [PATCH] close response body in heartbeat (#1637) --- pkg/apiclient/heartbeat.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/apiclient/heartbeat.go b/pkg/apiclient/heartbeat.go index 92725ba8b..1cbef5472 100644 --- a/pkg/apiclient/heartbeat.go +++ b/pkg/apiclient/heartbeat.go @@ -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