Skip to content

Commit

Permalink
don't request for completed torrent
Browse files Browse the repository at this point in the history
  • Loading branch information
mh0lt committed Jul 22, 2024
1 parent e00524b commit 9f65af9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webseed-peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func (ws *webseedPeer) requester(i int) {
ws.requesterCond.L.Lock()
defer ws.requesterCond.L.Unlock()

for !ws.peer.closed.IsSet() && i < ws.maxRequesters {
for !(ws.peer.closed.IsSet() || ws.peer.t.Complete.Bool()) && i < ws.maxRequesters {
// Restart is set if we don't need to wait for the requestCond before trying again.
restart := false

Expand Down

0 comments on commit 9f65af9

Please sign in to comment.