Browse Source

Souce can only be timed out if timeout is non-zero.

master v1.0.0
J. David Lee 4 years ago
parent
commit
49ab7946c7
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      types.go

+ 2
- 1
types.go View File

@ -18,7 +18,8 @@ type Source struct {
}
func (s Source) TimedOut() bool {
return time.Since(s.LastSeenAt) > time.Duration(s.AlertTimeout)*time.Second
return s.AlertTimeout != 0 &&
time.Since(s.LastSeenAt) > time.Duration(s.AlertTimeout)*time.Second
}
func (s Source) RequiresAlertForTimeout() bool {


Loading…
Cancel
Save