Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1989 from weaveworks/1977-restarting-not-running
Browse files Browse the repository at this point in the history
treat 'restarting' as 'not running'
  • Loading branch information
awh committed Feb 23, 2016
2 parents 4b0a6e1 + 4a71579 commit 639e0e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/docker/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 639e0e8

Please sign in to comment.