daemon: Fix started service leak

This commit is contained in:
世界 committed 2026-02-23 14:49:58 +08:00
1 parent 9bcd715d31
commit 7745a97cca
2 files changed
+9

No files matched your search

+8
View File
@@ -207,6 +207,14 @@ func (s *StartedService) StartOrReloadService(profileContent string, options *Ov
return nil
}
func (s *StartedService) Close() {
s.serviceStatusSubscriber.Close()
s.logSubscriber.Close()
s.urlTestSubscriber.Close()
s.clashModeSubscriber.Close()
s.connectionEventSubscriber.Close()
}
func (s *StartedService) CloseService() error {
s.serviceAccess.Lock()
switch s.serviceStatus.Status {