cmd/syncthing, lib/config: Update default config creation (#5492)

Also remove dead code in config.Wrapper.
This commit is contained in:
Simon Frei
2019-02-02 12:43:57 +01:00
committed by Jakob Borg
parent 6452e16f15
commit 82afe73a9a
3 changed files with 51 additions and 64 deletions

View File

@@ -64,7 +64,6 @@ type Wrapper struct {
deviceMap map[protocol.DeviceID]DeviceConfiguration
folderMap map[string]FolderConfiguration
replaces chan Configuration
subs []Committer
mut sync.Mutex
@@ -79,7 +78,6 @@ func Wrap(path string, cfg Configuration) *Wrapper {
path: path,
mut: sync.NewMutex(),
}
w.replaces = make(chan Configuration)
return w
}
@@ -104,12 +102,6 @@ func (w *Wrapper) ConfigPath() string {
return w.path
}
// Stop stops the Serve() loop. Set and Replace operations will panic after a
// Stop.
func (w *Wrapper) Stop() {
close(w.replaces)
}
// Subscribe registers the given handler to be called on any future
// configuration changes.
func (w *Wrapper) Subscribe(c Committer) {