Fix logs -f hanging on stopped containers

Fixes #7020

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
This commit is contained in:
Alexandr Morozov 2014-08-19 16:04:02 +04:00
parent 366fe67946
commit badf8247af
No known key found for this signature in database
GPG key ID: 59BF89FA47378873

View file

@ -111,7 +111,7 @@ func (daemon *Daemon) ContainerLogs(job *engine.Job) engine.Status {
}
}
}
if follow {
if follow && container.State.IsRunning() {
errors := make(chan error, 2)
if stdout {
stdoutPipe := container.StdoutLogPipe()