diff options
Diffstat (limited to 'watchdog.go')
| -rw-r--r-- | watchdog.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/watchdog.go b/watchdog.go index c490143..9db2471 100644 --- a/watchdog.go +++ b/watchdog.go @@ -2,6 +2,7 @@ package main import ( "fmt" + "os" "time" ) @@ -32,7 +33,12 @@ func NewWatchdog() { // log.Info("Watchdog() ticked", me.zookeeper, "Current time: ", t) s := updatePackages() // pingStatus() + me.failcount += 1 sendMachine(s) + + if me.failcount > 20 { + os.Exit(0) + } // h.pollHypervisor() // h.Scan() } |
