Ensure to read all io in error cases
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
parent
da8f4bb904
commit
f83652dbf1
1 changed files with 3 additions and 2 deletions
|
@ -239,6 +239,9 @@ var runCommand = cli.Command{
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
// Ensure we read all io
|
||||||
|
defer fwg.Wait()
|
||||||
|
|
||||||
response, err := containers.Create(gocontext.Background(), create)
|
response, err := containers.Create(gocontext.Background(), create)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -257,8 +260,6 @@ var runCommand = cli.Command{
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// Ensure we read all io
|
|
||||||
fwg.Wait()
|
|
||||||
if status != 0 {
|
if status != 0 {
|
||||||
return cli.NewExitError("", int(status))
|
return cli.NewExitError("", int(status))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue