From da81cf7fb19760d0882e9fb44306a3ce4a66d495 Mon Sep 17 00:00:00 2001 From: zenghongru Date: Wed, 24 Jul 2019 19:40:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=81=BF=E5=85=8D=E5=90=8C=E4=B8=80?= =?UTF-8?q?=E6=97=B6=E9=97=B4long=20pull?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- diamond.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diamond.go b/diamond.go index 10b8dab..391b180 100644 --- a/diamond.go +++ b/diamond.go @@ -118,6 +118,7 @@ func (d *Diamond) Add(unit Unit) { ) go func() { for { + time.Sleep(time.Duration(randomIntInRange(20, 100)) * time.Millisecond) newContentMD5, err := d.LongPull(unit, contentMD5) d.checkErr(unit, err) if contentMD5 == "" && @@ -128,7 +129,6 @@ func (d *Diamond) Add(unit Unit) { if newContentMD5 != "" { contentMD5 = newContentMD5 } - time.Sleep(time.Duration(randomIntInRange(20, 100)) * time.Millisecond) } }()