From bd00814301bbf5db037e739e91a0b66ebb564821 Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Fri, 20 Oct 2017 06:00:31 +0200 Subject: [PATCH] ae: do not trigger on Resume while holding the lock --- agent/ae/ae.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/agent/ae/ae.go b/agent/ae/ae.go index 3d5568d950..d177ee7763 100644 --- a/agent/ae/ae.go +++ b/agent/ae/ae.go @@ -313,8 +313,9 @@ func (s *StateSyncer) Resume() { if s.paused < 0 { panic("unbalanced pause/resume") } - if s.paused == 0 { + trigger := s.paused == 0 + s.pauseLock.Unlock() + if trigger { s.SyncChanges.Trigger() } - s.pauseLock.Unlock() }