ae: make control flow more explicit

This commit is contained in:
Frank Schroeder 2017-10-19 13:21:55 +02:00 committed by Frank Schröder
parent 0cfe0a42f1
commit 0d73333c8e
1 changed files with 2 additions and 2 deletions

View File

@ -142,6 +142,7 @@ FullSync:
case <-s.SyncFull.Notif():
select {
case <-time.After(s.stagger(s.serverUpInterval)):
continue FullSync
case <-s.ShutdownCh:
return
}
@ -149,12 +150,11 @@ FullSync:
// retry full sync after some time
// todo(fs): why don't we use s.Interval here?
case <-time.After(s.retryFailInterval + s.stagger(s.retryFailInterval)):
continue FullSync
case <-s.ShutdownCh:
return
}
continue
}
// do partial syncs until it is time for a full sync again