mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 14:50:56 +00:00
This commit is contained in:
parent
c934918347
commit
fc860df514
@ -136,10 +136,13 @@ func (a *aggregator) mainLoop(in <-chan fs.Event, out chan<- []string, cfg *conf
|
||||
a.notifyTimer = time.NewTimer(a.notifyDelay)
|
||||
defer a.notifyTimer.Stop()
|
||||
|
||||
inProgress := make(map[string]struct{})
|
||||
inProgressItemSubscription := events.Default.Subscribe(events.ItemStarted | events.ItemFinished)
|
||||
defer events.Default.Unsubscribe(inProgressItemSubscription)
|
||||
|
||||
cfg.Subscribe(a)
|
||||
defer cfg.Unsubscribe(a)
|
||||
|
||||
inProgress := make(map[string]struct{})
|
||||
|
||||
for {
|
||||
select {
|
||||
@ -154,7 +157,6 @@ func (a *aggregator) mainLoop(in <-chan fs.Event, out chan<- []string, cfg *conf
|
||||
case folderCfg := <-a.folderCfgUpdate:
|
||||
a.updateConfig(folderCfg)
|
||||
case <-a.ctx.Done():
|
||||
cfg.Unsubscribe(a)
|
||||
l.Debugln(a, "Stopped")
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user