From 79e94abae5a30c23db162225877c5a85cd9fe92f Mon Sep 17 00:00:00 2001 From: Pavlo Golub Date: Wed, 11 Dec 2024 09:47:49 +0100 Subject: [PATCH] [-] fix memory leak in Patroni checker, fixes #285 (#286) --- 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 } }