mirror of
https://github.com/docker/compose.git
synced 2025-07-23 05:34:36 +02:00
Merge pull request #332 from docker/feat-sleep-ctx
Sleep cancel sleep on log follow if the user cancels
This commit is contained in:
commit
1b9dd7ac27
@ -271,7 +271,11 @@ func streamLogs(ctx context.Context, aciContext store.AciContext, containerGroup
|
|||||||
fmt.Fprintln(out, logLines[i])
|
fmt.Fprintln(out, logLines[i])
|
||||||
}
|
}
|
||||||
|
|
||||||
time.Sleep(2 * time.Second)
|
select {
|
||||||
|
case <-ctx.Done():
|
||||||
|
return nil
|
||||||
|
case <-time.After(2 * time.Second):
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user