diff options
Diffstat (limited to 'http.go')
| -rw-r--r-- | http.go | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -86,12 +86,12 @@ func okHandler(w http.ResponseWriter, r *http.Request) { var bad int for m := range me.machines.IterAll() { count += 1 - if m.SinceLastUpdate() > 10*time.Minute { - // skip machines that have not been updated in the last 10 minutes - log.Info("ignoring old machine", m.Hostname) - continue - } if findVersion(m, "zood") != me.zood.version { + if m.SinceLastUpdate() > 10*time.Minute { + // skip machines that have not been updated in the last 10 minutes + log.Info("ignoring old machine", m.Hostname) + continue + } bad += 1 } } @@ -116,5 +116,6 @@ func startHTTP() { err := http.ListenAndServe(p, nil) if err != nil { log.Println("Error starting server:", err) + badExit(err) } } |
