Moves callback into Run method arg

This commit is contained in:
riccardom
2026-06-11 12:58:33 +02:00
parent ccc33ccd65
commit d8ba5e6f6b
3 changed files with 37 additions and 36 deletions
+2 -2
View File
@@ -174,8 +174,8 @@ func (s *Server) Start() error {
// applies the freshly-read MDM policy as the last layer) and brings
// the engine back with the new values.
if s.mdmTicker == nil {
s.mdmTicker = mdm.NewTicker(mdm.DefaultReloadInterval, s.onMDMPolicyChange)
go s.mdmTicker.Run(s.rootCtx)
s.mdmTicker = mdm.NewTicker(mdm.DefaultReloadInterval)
go s.mdmTicker.Run(s.rootCtx, s.onMDMPolicyChange)
}
// if current state contains any error, return it