From: Matt Joiner Date: Fri, 3 Dec 2021 05:41:52 +0000 (+1100) Subject: Don't try to request anything without the torrent info X-Git-Tag: v1.39.0^2~10 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=73be571f500f649c0fca55ab22b2d8aeebfa8c27;p=btrtrc.git Don't try to request anything without the torrent info --- diff --git a/requesting.go b/requesting.go index 6a611b94..2a400ccd 100644 --- a/requesting.go +++ b/requesting.go @@ -151,6 +151,9 @@ type desiredRequestState struct { } func (p *Peer) getDesiredRequestState() (desired desiredRequestState) { + if !p.t.haveInfo() { + return + } input := p.t.getRequestStrategyInput() requestHeap := peerRequests{ peer: p,