Skip to content

Commit

Permalink
no wait if closed
Browse files Browse the repository at this point in the history
  • Loading branch information
mh0lt committed Jul 4, 2024
1 parent ce297a6 commit 61397ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions webseed-peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,10 @@ func (ws *webseedPeer) requester(i int) {
ws.waiting++
ws.peer.mu.Unlock()

if ws.peer.closed.IsSet() {
break
}

ws.requesterCond.Wait()

ws.peer.mu.Lock()
Expand Down

0 comments on commit 61397ac

Please sign in to comment.