Inlining error check

This commit is contained in:
Diptanu Choudhury 2015-11-09 16:45:42 -08:00
parent 38a047ec6d
commit c618d7ed58
1 changed files with 1 additions and 2 deletions

View File

@ -201,8 +201,7 @@ func (r *AllocRunner) dirtySyncState() {
// retrySyncState is used to retry the state sync until success
func (r *AllocRunner) retrySyncState(stopCh chan struct{}) {
for {
err := r.syncStatus()
if err == nil {
if err := r.syncStatus(); err == nil {
// The Alloc State might have been re-computed so we are
// snapshoting only the alloc runner
r.SaveState(false)