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'.
This commit is contained in:
Matthias Radestock committed 2016-02-20 11:00:04 +00:00
1 parent e52abafc48
commit 4a7157959a
1 file changed
+1 -1
+1 -1
View File
@@ -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)
}
}