Skip to content

Commit

Permalink
icinga2: Don't reuse fake acknowledgement-set event
Browse files Browse the repository at this point in the history
  • Loading branch information
yhabteab authored and julianbrost committed Jul 18, 2024
1 parent 2b32ff4 commit 74e05ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/icinga2/client_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ func (client *Client) checkMissedChanges(ctx context.Context, objType string, ca
}

fakeEv.Message = attrs.LastCheckResult.Output
ackEvent := *fakeEv
select {
case catchupEventCh <- &catchupEventMsg{eventMsg: &eventMsg{fakeEv, attrs.LastStateChange.Time()}}:
if fakeEv.Type == event.TypeUnmute {
Expand All @@ -325,7 +326,7 @@ func (client *Client) checkMissedChanges(ctx context.Context, objType string, ca
select {
// Retry the AckSet event so that the author of the ack is set as the incident
// manager if there was no existing incident before the above state change event.
case catchupEventCh <- &catchupEventMsg{eventMsg: &eventMsg{fakeEv, attrs.LastStateChange.Time()}}:
case catchupEventCh <- &catchupEventMsg{eventMsg: &eventMsg{&ackEvent, attrs.LastStateChange.Time()}}:
case <-ctx.Done():
return ctx.Err()
}
Expand Down

0 comments on commit 74e05ee

Please sign in to comment.