lib: Consistently unsubscribe from config-wrapper (fixes #6133) (#6205)

This commit is contained in:
Simon Frei
2019-12-04 07:15:00 +01:00
committed by Jakob Borg
parent a9e490adfa
commit 6fd5e78740
5 changed files with 27 additions and 5 deletions

View File

@@ -193,6 +193,12 @@ func NewService(cfg config.Wrapper, myID protocol.DeviceID, mdl Model, tlsCfg *t
return service
}
func (s *service) Stop() {
s.cfg.Unsubscribe(s.limiter)
s.cfg.Unsubscribe(s)
s.Supervisor.Stop()
}
func (s *service) handle(ctx context.Context) {
var c internalConn
for {