mirror of
https://github.com/prometheus/alertmanager
synced 2024-12-27 08:32:15 +00:00
Fix infinite recursion bug in Alert merge
This commit is contained in:
parent
fa7955c9bc
commit
78008cd012
@ -65,7 +65,7 @@ func Alerts(alerts ...*Alert) model.Alerts {
|
||||
// A new alert is returned, the labels are assumed to be equal.
|
||||
func (a *Alert) Merge(o *Alert) *Alert {
|
||||
// Let o always be the younger alert.
|
||||
if !a.UpdatedAt.Before(o.UpdatedAt) {
|
||||
if o.UpdatedAt.Before(a.UpdatedAt) {
|
||||
return o.Merge(a)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user