Only assert pending requests when check is enabled
Uses too much CPU for production from its current callsites.
This commit is contained in:
parent
344ada8b7c
commit
98957b6e8e
|
@ -1408,6 +1408,9 @@ func (t *Torrent) numActivePeers() (num int) {
|
|||
}
|
||||
|
||||
func (t *Torrent) assertPendingRequests() {
|
||||
if !check {
|
||||
return
|
||||
}
|
||||
var actual pendingRequests
|
||||
if t.haveInfo() {
|
||||
actual.m = make([]int, t.numRequests())
|
||||
|
|
Loading…
Reference in New Issue