mirror of
https://git.coolaj86.com/coolaj86/go-watchdog.git
synced 2025-02-22 04:48:07 +00:00
v1.2.2: bugfix change detection
This commit is contained in:
parent
a644752133
commit
80ad9d9dc3
@ -81,6 +81,7 @@ func (d *Dog) watch() {
|
||||
return
|
||||
}
|
||||
|
||||
changed := d.changed
|
||||
time.Sleep(time.Duration(5) * time.Second)
|
||||
|
||||
err2 := d.check()
|
||||
@ -108,7 +109,8 @@ func (d *Dog) watch() {
|
||||
// TODO what if the server is flip-flopping rapidly?
|
||||
// how to rate limit?
|
||||
// "{{ .Server }} is on cooldown for 30 minutes"
|
||||
if d.changed {
|
||||
if changed {
|
||||
changed = false
|
||||
d.notify("went down")
|
||||
if StatusUp == d.status {
|
||||
break
|
||||
|
Loading…
x
Reference in New Issue
Block a user