summaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-03-21 23:43:40 -0500
committerJeff Carr <[email protected]>2025-03-22 09:45:41 -0500
commitfc82e095ef933d152bc8a627ff6f67a8589c1c6f (patch)
tree7b514e6be9e007345498614033487db1a8543c7f /http.go
parentb5925dcdce2f91c23f522a6541f628a2be3e3ece (diff)
show virtigod for nowv0.0.50
Diffstat (limited to 'http.go')
-rw-r--r--http.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/http.go b/http.go
index cc19929..8eac404 100644
--- a/http.go
+++ b/http.go
@@ -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)
}
}