diff --git a/internal/backend/logs.go b/internal/backend/logs.go index b99d5e2..bd07216 100644 --- a/internal/backend/logs.go +++ b/internal/backend/logs.go @@ -57,18 +57,18 @@ func (in *instance) GetLogs(tainr *types.Container, follow bool, count int, stop // read log input (blocking read) buf := make([]byte, 255) n, err := stream.Read(buf) - if n == 0 { - if !follow { - break - } - continue - } if err == io.EOF { break } if err != nil { return err } + if n == 0 { + if !follow { + break + } + continue + } // write log to output if n, err = out.Write(buf[:n]); n == 0 || err != nil { break