From 07cdf0364c727da9fe7f9d1c684d7b07f6cf5151 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Sat, 29 Nov 2014 22:51:13 +0100 Subject: [PATCH] Data race: ProgressEmitter (debug output only) --- internal/model/progressemitter.go | 2 +- test/h2/config.xml | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/internal/model/progressemitter.go b/internal/model/progressemitter.go index 9adaf7ea0..b1d4bbca9 100755 --- a/internal/model/progressemitter.go +++ b/internal/model/progressemitter.go @@ -46,11 +46,11 @@ func (t *ProgressEmitter) Serve() { } return case <-t.timer.C: + t.mut.Lock() if debug { l.Debugln("progress emitter: timer - looking after", len(t.registry)) } output := make(map[string]map[string]*pullerProgress) - t.mut.Lock() for _, puller := range t.registry { if output[puller.folder] == nil { output[puller.folder] = make(map[string]*pullerProgress) diff --git a/test/h2/config.xml b/test/h2/config.xml index 4e4fcfe70..164fd1bdc 100644 --- a/test/h2/config.xml +++ b/test/h2/config.xml @@ -102,18 +102,27 @@ false + 1 + 16 + 1 false + 1 + 16 + 1 false + 1 + 16 + 1
dynamic
@@ -434,9 +443,11 @@ 0 30 -1 + true 12 24 true + 5