mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-01 02:23:18 +08:00
move taskdone inside lock boundaries
This commit is contained in:
@ -69,8 +69,8 @@ func (tl *prq) Push(entry wantlist.Entry, to peer.ID) {
|
||||
Target: to,
|
||||
created: time.Now(),
|
||||
Done: func() {
|
||||
partner.TaskDone(entry.Key)
|
||||
tl.lock.Lock()
|
||||
partner.TaskDone(entry.Key)
|
||||
tl.pQueue.Update(partner.Index())
|
||||
tl.lock.Unlock()
|
||||
},
|
||||
|
Reference in New Issue
Block a user