From 4a7157959a318cf07d38fed0c7e87e3077c78248 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sat, 20 Feb 2016 11:00:04 +0000 Subject: [PATCH] don't attempt to attach 'restarting' containers this is an optimisation... there is no point attempting to attach a 'restarting' container - it will fail. When the container *actually* restarts we'll get a 'Start' event, and attach at that point. Also, there is no point checking for 'Paused' since 'Paused' -> 'Running'. --- proxy/proxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/proxy.go b/proxy/proxy.go index 9dfb7972..c316c1cb 100644 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -132,7 +132,7 @@ func (proxy *Proxy) AttachExistingContainers() { } continue } - if containerShouldAttach(container) && (container.State.Running || container.State.Paused) { + if containerShouldAttach(container) && container.State.Running && !container.State.Restarting { proxy.attach(container, false) } }