mirror of https://github.com/docker/cli.git
exit collect when we get EOF
Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
This commit is contained in:
parent
9b17b8ea18
commit
5860dd5f80
|
@ -155,11 +155,13 @@ func collect(ctx context.Context, s *formatter.ContainerStats, cli client.APICli
|
|||
waitFirst.Done()
|
||||
}
|
||||
case err := <-u:
|
||||
s.SetError(err)
|
||||
if err == io.EOF {
|
||||
break
|
||||
}
|
||||
if err != nil {
|
||||
s.SetError(err)
|
||||
continue
|
||||
}
|
||||
s.SetError(nil)
|
||||
// if this is the first stat you get, release WaitGroup
|
||||
if !getFirst {
|
||||
getFirst = true
|
||||
|
|
Loading…
Reference in New Issue