v1.2.2: bugfix change detection

This commit is contained in:
AJ ONeal 2019-07-04 18:57:58 -06:00
父節點 a644752133
當前提交 80ad9d9dc3
共有 1 個檔案被更改,包括 3 行新增1 行删除

查看文件

@ -81,6 +81,7 @@ func (d *Dog) watch() {
return return
} }
changed := d.changed
time.Sleep(time.Duration(5) * time.Second) time.Sleep(time.Duration(5) * time.Second)
err2 := d.check() err2 := d.check()
@ -108,7 +109,8 @@ func (d *Dog) watch() {
// TODO what if the server is flip-flopping rapidly? // TODO what if the server is flip-flopping rapidly?
// how to rate limit? // how to rate limit?
// "{{ .Server }} is on cooldown for 30 minutes" // "{{ .Server }} is on cooldown for 30 minutes"
if d.changed { if changed {
changed = false
d.notify("went down") d.notify("went down")
if StatusUp == d.status { if StatusUp == d.status {
break break