Merge pull request #1989 from weaveworks/1977-restarting-not-running
treat 'restarting' as 'not running'
This commit is contained in:
commit
639e0e82c9
2 files changed
+2
-2
No files matched your search
@@ -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
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user