Improved detection of router container restart

Use the container name in addition to the entrypoint to avoid triggering
reattachment unnecessarily.
This commit is contained in:
Adam Harrison committed 2015-10-27 14:41:26 +00:00
1 parent 94d7f33a03
commit 4792fe6391
2 files changed
+3 -1

No files matched your search

+2 -1
View File
@@ -315,7 +315,8 @@ func containerShouldAttach(container *docker.Container) bool {
}
func containerIsWeaveRouter(container *docker.Container) bool {
return len(container.Config.Entrypoint) > 0 && container.Config.Entrypoint[0] == weaveEntrypoint
return container.Name == weaveContainerName &&
len(container.Config.Entrypoint) > 0 && container.Config.Entrypoint[0] == weaveEntrypoint
}
func (proxy *Proxy) createWait(r *http.Request, ident string) {