ensure Loop() is started before feeding refresh chan

This commit is contained in:
Bradley Cicenas
2017-03-09 07:39:11 +00:00
parent 2f17a9d689
commit ecc37a2f99

View File

@@ -31,8 +31,8 @@ func NewDockerContainerSource() *DockerContainerSource {
containers: make(map[string]*Container), containers: make(map[string]*Container),
needsRefresh: make(chan string, 60), needsRefresh: make(chan string, 60),
} }
cm.refreshAll()
go cm.Loop() go cm.Loop()
cm.refreshAll()
go cm.watchEvents() go cm.watchEvents()
return cm return cm
} }