浏览代码

lib/config: Subscribers get a copy of the config

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3722
Audrius Butkevicius 9 年之前
父节点
当前提交
56e2ba29d0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/config/wrapper.go

+ 1 - 1
lib/config/wrapper.go

@@ -159,7 +159,7 @@ func (w *Wrapper) replaceLocked(to Configuration) error {
 
 func (w *Wrapper) notifyListeners(from, to Configuration) {
 	for _, sub := range w.subs {
-		go w.notifyListener(sub, from, to)
+		go w.notifyListener(sub, from.Copy(), to.Copy())
 	}
 }