Commit 31198d43 authored by Jeromy's avatar Jeromy Committed by Juan Batiz-Benet

move taskdone inside lock boundaries

parent 06821bb3
......@@ -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()
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment