Merge pull request #7629 from LK4D4/fix_follow_hang_on_stop

Fix logs -f hanging on stopped containers
This commit is contained in:
Michael Crosby
2014-08-25 15:24:20 -07:00
2 changed files with 33 additions and 1 deletions
+1 -1
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()