also cleanup during startup

This commit is contained in:
wh1te909 2023-05-26 14:14:40 -07:00
parent d62966dd74
commit e15b1a50c3

View File

@ -55,6 +55,12 @@ func (a *Agent) AgentSvc(nc *nats.Conn) {
a.Logger.Debugf("AgentSvc() sleeping for %v seconds", sleepDelay)
time.Sleep(time.Duration(sleepDelay) * time.Second)
if runtime.GOOS == "windows" {
a.KillHungUpdates()
time.Sleep(1 * time.Second)
a.CleanupAgentUpdates()
}
conf := a.GetAgentCheckInConfig(a.GetCheckInConfFromAPI())
a.Logger.Debugf("+%v\n", conf)
for _, s := range natsCheckin {