Data race: ProgressEmitter (debug output only)

This commit is contained in:
Jakob Borg
2014-11-29 22:51:13 +01:00
parent 7f829f0159
commit 07cdf0364c
2 changed files with 12 additions and 1 deletions

View File

@@ -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)