Mark piece complete without Client lock
This commit is contained in:
parent
0d40c4bac2
commit
6cceb5749d
@ -1748,10 +1748,16 @@ func (t *Torrent) pieceHashed(piece pieceIndex, passed bool, hashIoErr error) {
|
||||
c._stats.incrementPiecesDirtiedGood()
|
||||
}
|
||||
t.clearPieceTouchers(piece)
|
||||
t.cl.unlock()
|
||||
err := p.Storage().MarkComplete()
|
||||
if err != nil {
|
||||
t.logger.Printf("%T: error marking piece complete %d: %s", t.storage, piece, err)
|
||||
}
|
||||
t.cl.lock()
|
||||
|
||||
if t.closed.IsSet() {
|
||||
return
|
||||
}
|
||||
t.pendAllChunkSpecs(piece)
|
||||
} else {
|
||||
if len(p.dirtiers) != 0 && p.allChunksDirty() && hashIoErr == nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user