From 3c72bfa6f6e1a215e4ea0516cf059a5de43f89e6 Mon Sep 17 00:00:00 2001 From: zenghur Date: Mon, 18 May 2020 18:33:04 +0800 Subject: [PATCH] fix: map --- diamond.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/diamond.go b/diamond.go index a900873..e9aa428 100644 --- a/diamond.go +++ b/diamond.go @@ -210,10 +210,11 @@ func (d *Diamond) notify(oo ...*observer.Observer) { } func (d *Diamond) hang(i info.Info) { - // 不要在同一时间启动long pull - time.Sleep(time.Duration(randomIntInRange(20, 100)) * time.Millisecond) go func() { for { + // 不要在同一时间启动long pull + time.Sleep(time.Duration(randomIntInRange(20, 100)) * time.Millisecond) + content, newContentMD5, err := d.LongPull(i, d.all[i].ContentMD5) d.checkErr(i, err)