Merge pull request #551 from hqhq/defer_io_wait
Ensure to read all io in error cases
This commit is contained in:
commit
e17e9216ef
1 changed files with 3 additions and 2 deletions
|
@ -239,6 +239,9 @@ var runCommand = cli.Command{
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Ensure we read all io
|
||||
defer fwg.Wait()
|
||||
|
||||
response, err := containers.Create(gocontext.Background(), create)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -257,8 +260,6 @@ var runCommand = cli.Command{
|
|||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
// Ensure we read all io
|
||||
fwg.Wait()
|
||||
if status != 0 {
|
||||
return cli.NewExitError("", int(status))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue