summaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-10-13 02:23:30 -0500
committerJeff Carr <[email protected]>2024-10-13 02:23:30 -0500
commitca1a78394fe2fe7d556153819dd5f20e3d65920a (patch)
tree676168a2e3cc55f67c0fc7091dae3e0c1377a8d6 /http.go
parent268cec143ae544d8b6abed55b2f84570b51ea030 (diff)
attempt to generate an event. next up: protobuf
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'http.go')
-rw-r--r--http.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/http.go b/http.go
index 5bf5300..085757b 100644
--- a/http.go
+++ b/http.go
@@ -71,11 +71,8 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
url := "http://" + h.Hostname + ":2520/kill"
dur := time.Since(h.lastpoll) // Calculate the elapsed time
if dur > 90*time.Second {
- log.Info("KILL DAEMON ON", h.Hostname, shell.FormatDuration(dur), "curl", url)
- // s := shell.Wget(url)
- // log.Info("curl got:", s)
- h.lastpoll = time.Now()
- h.killcount += 1
+ h.RestartDaemon()
+ continue
}
if h.killcount != 0 {
log.Info("KILL count =", h.killcount, "FOR", h.Hostname, dur, "curl", url)