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 } }