summaryrefslogtreecommitdiff
path: root/poll.go
diff options
context:
space:
mode:
Diffstat (limited to 'poll.go')
-rw-r--r--poll.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/poll.go b/poll.go
index 981bf86..1497509 100644
--- a/poll.go
+++ b/poll.go
@@ -139,15 +139,15 @@ func clusterHealthy() (bool, string) {
if me.killcount > 0 {
summary += "(killcount=" + fmt.Sprintf("%d", me.killcount) + ")"
}
- last := time.Since(me.stable)
+ last := time.Since(me.unstable)
if last > 133*time.Second {
// the cluster has not been stable for 10 seconds
- s := shell.FormatDuration(last)
- summary += "(unstable " + s + ")"
+ s := strings.TrimSpace(shell.FormatDuration(last))
+ summary += "(stable=" + s + ")"
}
if good {
- me.stable = time.Now()
return good, "GOOD=true " + summary
}
+ me.unstable = time.Now()
return good, "GOOD=false " + summary
}