torrent.go | 3 +++ diff --git a/torrent.go b/torrent.go index d606971dffca4d08b80c8c6738dfb66979db3b40..5f18df1f3e9bacfd9dc9707fdbb6a4fc66f16bb5 100644 --- a/torrent.go +++ b/torrent.go @@ -1408,6 +1408,9 @@ return } func (t *Torrent) assertPendingRequests() { + if !check { + return + } var actual pendingRequests if t.haveInfo() { actual.m = make([]int, t.numRequests())