Update main.go
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-12-03 09:15:19 +11:00
parent a615602bf8
commit a1e4649455

View File

@@ -294,8 +294,8 @@ func main() {
// make sure that this event is within 10 minutes either side of the corresponding host failed event
if hostFound {
unreachableStartComparison := h.CreatedTime.In(location).Add(time.Duration(int64(time.Minute) * -1 * *unreachableMinutes))
unreachableEndComparison := h.CreatedTime.In(location).Add(time.Duration(int64(time.Minute) * *unreachableMinutes))
unreachableStartComparison := h.CreatedTime.In(location).Add(time.Duration(int64(time.Minute) * -1 * int64(*unreachableMinutes)))
unreachableEndComparison := h.CreatedTime.In(location).Add(time.Duration(int64(time.Minute) * int64(*unreachableMinutes)))
if haFailedTime.Before(unreachableEndComparison) && haFailedTime.After(unreachableStartComparison) {
haUnreachableEvents = append(haUnreachableEvents, h)