Inlineable (*Torrent).PieceState()
(#621)
This commit is contained in:
parent
d00ba917c0
commit
542970b961
7
t.go
7
t.go
@ -74,10 +74,11 @@ func (t *Torrent) PieceStateRuns() (runs PieceStateRuns) {
|
||||
return
|
||||
}
|
||||
|
||||
func (t *Torrent) PieceState(piece pieceIndex) PieceState {
|
||||
func (t *Torrent) PieceState(piece pieceIndex) (ps PieceState) {
|
||||
t.cl.rLock()
|
||||
defer t.cl.rUnlock()
|
||||
return t.pieceState(piece)
|
||||
ps = t.pieceState(piece)
|
||||
t.cl.rUnlock()
|
||||
return
|
||||
}
|
||||
|
||||
// The number of pieces in the torrent. This requires that the info has been
|
||||
|
Loading…
x
Reference in New Issue
Block a user