1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-10-05 09:53:21 +08:00

Omit race conditions and update swarm info events

This commit is contained in:
Marcos Lilljedahl
2016-12-02 10:29:41 -03:00
parent 84da622775
commit a7811b4e33
4 changed files with 15 additions and 12 deletions

View File

@@ -66,7 +66,8 @@ func (s *Session) SchedulePeriodicTasks() {
for range s.ticker.C {
var wg = sync.WaitGroup{}
wg.Add(len(s.Instances))
for _, i := range s.Instances {
for _, ins := range s.Instances {
var i *Instance = ins
if i.dockerClient == nil {
// Need to create client to the DinD docker daemon