From badf8247afa378d04835ec19243ede2fb89a7b31 Mon Sep 17 00:00:00 2001 From: Alexandr Morozov Date: Tue, 19 Aug 2014 16:04:02 +0400 Subject: [PATCH] Fix logs -f hanging on stopped containers Fixes #7020 Signed-off-by: Alexandr Morozov --- daemon/logs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/logs.go b/daemon/logs.go index 386d9c69c3..c9c2ab89ba 100644 --- a/daemon/logs.go +++ b/daemon/logs.go @@ -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()