After container restart register printer consumer

Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
This commit is contained in:
Joana Hrotko 2024-09-24 12:17:15 +01:00 committed by Guillaume Lours
parent 34b18194f7
commit 8b9fe89842
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ func (p *printer) Run(cascade api.Cascade, exitCodeFrom string, stopFn func() er
case api.UserCancel:
aborting = true
case api.ContainerEventAttach:
if _, ok := containers[id]; ok {
if attached, ok := containers[id]; ok && attached {
continue
}
containers[id] = true