Torrent.Stats: RLock instead of Lock
This commit is contained in:
parent
70dfc1f518
commit
0f90af85f1
@ -1436,8 +1436,8 @@ func (t *Torrent) addPeers(peers []Peer) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *Torrent) Stats() TorrentStats {
|
func (t *Torrent) Stats() TorrentStats {
|
||||||
t.cl.mu.Lock()
|
t.cl.mu.RLock()
|
||||||
defer t.cl.mu.Unlock()
|
defer t.cl.mu.RUnlock()
|
||||||
return t.statsLocked()
|
return t.statsLocked()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user