From e15b1a50c38e57fa67728c1a941bc9360c3258bd Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Fri, 26 May 2023 14:14:40 -0700 Subject: [PATCH] also cleanup during startup --- agent/svc.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/agent/svc.go b/agent/svc.go index cdaa11e..9e7f9c0 100644 --- a/agent/svc.go +++ b/agent/svc.go @@ -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 {