Skip to content

Commit 164b218

Browse files
committed
[-] fix memory leak in Patroni checker, fixes #285
1 parent 915c2fa commit 164b218

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

checker/patroni_leader_checker.go

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ func (c *PatroniLeaderChecker) GetChangeNotificationStream(ctx context.Context,
3434
c.Logger.Sugar().Error("patroni REST API error:", err)
3535
continue
3636
}
37+
r.Body.Close() //throw away the body
3738
out <- strconv.Itoa(r.StatusCode) == c.TriggerValue
3839
}
3940
}

0 commit comments

Comments
 (0)