ae: do not trigger on Resume while holding the lock

This commit is contained in:
Frank Schroeder 2017-10-20 06:00:31 +02:00 committed by Frank Schröder
parent 82e9494f7f
commit 606e13a569
1 changed files with 3 additions and 2 deletions

View File

@ -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()
}