When unexpected state found in waiting, notify the caller func with a correct error message

This commit is contained in:
Henry Huang 2014-05-11 00:40:50 +08:00
parent 3a74c469e5
commit 5d410bddc9
1 changed files with 2 additions and 2 deletions

View File

@ -151,8 +151,8 @@ func WaitForState(conf *StateChangeConf) (i interface{}, err error) {
} }
if !found { if !found {
fmt.Errorf("unexpected state '%s', wanted target '%s'", currentState, conf.Target) err := fmt.Errorf("unexpected state '%s', wanted target '%s'", currentState, conf.Target)
return return nil, err
} }
} }