Skip to content

Commit

Permalink
fix: map
Browse files Browse the repository at this point in the history
  • Loading branch information
zenghur committed May 18, 2020
1 parent 68b3355 commit 3c72bfa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions diamond.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 3c72bfa

Please sign in to comment.