mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-03 15:17:25 +00:00
This commit is contained in:
parent
a8e2fc6f61
commit
c494ced21f
@ -146,7 +146,6 @@ type service struct {
|
|||||||
listenersMut sync.RWMutex
|
listenersMut sync.RWMutex
|
||||||
listeners map[string]genericListener
|
listeners map[string]genericListener
|
||||||
listenerTokens map[string]suture.ServiceToken
|
listenerTokens map[string]suture.ServiceToken
|
||||||
listenerSupervisor *suture.Supervisor
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewService(cfg config.Wrapper, myID protocol.DeviceID, mdl Model, tlsCfg *tls.Config, discoverer discover.Finder, bepProtocolName string, tlsDefaultCommonName string, evLogger events.Logger) Service {
|
func NewService(cfg config.Wrapper, myID protocol.DeviceID, mdl Model, tlsCfg *tls.Config, discoverer discover.Finder, bepProtocolName string, tlsDefaultCommonName string, evLogger events.Logger) Service {
|
||||||
@ -725,7 +724,7 @@ func (s *service) CommitConfiguration(from, to config.Configuration) bool {
|
|||||||
for addr, listener := range s.listeners {
|
for addr, listener := range s.listeners {
|
||||||
if _, ok := seen[addr]; !ok || listener.Factory().Valid(to) != nil {
|
if _, ok := seen[addr]; !ok || listener.Factory().Valid(to) != nil {
|
||||||
l.Debugln("Stopping listener", addr)
|
l.Debugln("Stopping listener", addr)
|
||||||
s.listenerSupervisor.Remove(s.listenerTokens[addr])
|
s.Remove(s.listenerTokens[addr])
|
||||||
delete(s.listenerTokens, addr)
|
delete(s.listenerTokens, addr)
|
||||||
delete(s.listeners, addr)
|
delete(s.listeners, addr)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user