From 164b218b7ccd2e14a7e410eacc0dd84d2978b829 Mon Sep 17 00:00:00 2001 From: Pavlo Golub Date: Mon, 9 Dec 2024 16:47:42 +0100 Subject: [PATCH] [-] fix memory leak in Patroni checker, fixes #285 --- checker/patroni_leader_checker.go | 1 + 1 file changed, 1 insertion(+) diff --git a/checker/patroni_leader_checker.go b/checker/patroni_leader_checker.go index 17d0b5f..b82f41a 100644 --- a/checker/patroni_leader_checker.go +++ b/checker/patroni_leader_checker.go @@ -34,6 +34,7 @@ func (c *PatroniLeaderChecker) GetChangeNotificationStream(ctx context.Context, c.Logger.Sugar().Error("patroni REST API error:", err) continue } + r.Body.Close() //throw away the body out <- strconv.Itoa(r.StatusCode) == c.TriggerValue } }