Merge pull request #1989 from weaveworks/1977-restarting-not-running

treat 'restarting' as 'not running'
This commit is contained in:
Adam Harrison committed 2016-02-23 10:49:31 +00:00
commit 639e0e82c9
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -97,7 +97,7 @@ func (c *Client) AddObserver(ob ContainerObserver) error {
func (c *Client) IsContainerNotRunning(idStr string) bool {
container, err := c.InspectContainer(idStr)
if err == nil {
return !container.State.Running
return !container.State.Running || container.State.Restarting
}
if _, notThere := err.(*docker.NoSuchContainer); notThere {
return true
+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)
}
}