daemon: Fix registry leak

This commit is contained in:
世界
2026-04-19 20:39:38 +08:00
parent 0bd109d7bc
commit ca76c56377

View File

@@ -69,7 +69,7 @@ type OverrideOptions struct {
} }
func (s *StartedService) newInstance(profileContent string, overrideOptions *OverrideOptions) (*Instance, error) { func (s *StartedService) newInstance(profileContent string, overrideOptions *OverrideOptions) (*Instance, error) {
ctx := s.ctx ctx := service.ExtendContext(s.ctx)
service.MustRegister[deprecated.Manager](ctx, new(deprecatedManager)) service.MustRegister[deprecated.Manager](ctx, new(deprecatedManager))
ctx, cancel := context.WithCancel(include.Context(ctx)) ctx, cancel := context.WithCancel(include.Context(ctx))
options, err := parseConfig(ctx, profileContent) options, err := parseConfig(ctx, profileContent)