Skip to content

Commit

Permalink
Return cleanly on io.EOF
Browse files Browse the repository at this point in the history
  • Loading branch information
ash2k committed Jun 22, 2024
1 parent 102eb4a commit 354d95e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,8 @@ func (c *DockerContainer) startLogProduction(ctx context.Context, opts ...LogPro
_, err := io.ReadFull(r, h)
if err != nil {
switch {
case err == io.EOF:
// No more logs coming
case errors.Is(err, net.ErrClosed):
now := time.Now()
since = fmt.Sprintf("%d.%09d", now.Unix(), int64(now.Nanosecond()))
Expand Down

0 comments on commit 354d95e

Please sign in to comment.