fix race condition in windows agent update amidaware/tacticalrmm#1250
This commit is contained in:
parent
eddafb873b
commit
e11c38dd49
@ -154,7 +154,7 @@ func New(logger *logrus.Logger, version string) *Agent {
|
||||
Option: service.KeyValue{
|
||||
"StartType": "automatic",
|
||||
"OnFailure": "restart",
|
||||
"OnFailureDelayDuration": "5s",
|
||||
"OnFailureDelayDuration": "12s",
|
||||
"OnFailureResetPeriod": 10,
|
||||
},
|
||||
}
|
||||
|
@ -479,6 +479,7 @@ func (a *Agent) RunRPC() {
|
||||
atomic.StoreUint32(&agentUpdateLocker, 0)
|
||||
nc.Flush()
|
||||
nc.Close()
|
||||
a.ControlService(winSvcName, "stop")
|
||||
os.Exit(0)
|
||||
}
|
||||
}(payload)
|
||||
|
Loading…
Reference in New Issue
Block a user