From 56e2ba29d0f973b285868131e8226885f72d79f5 Mon Sep 17 00:00:00 2001 From: Audrius Butkevicius Date: Fri, 11 Nov 2016 14:52:23 +0000 Subject: [PATCH] lib/config: Subscribers get a copy of the config GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3722 --- lib/config/wrapper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/config/wrapper.go b/lib/config/wrapper.go index dcce23ec3..b387b2314 100644 --- a/lib/config/wrapper.go +++ b/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()) } }