Skip to content

Commit

Permalink
add signal forwarding for exiting requesters
Browse files Browse the repository at this point in the history
  • Loading branch information
mh0lt committed May 27, 2024
1 parent 3e31912 commit 5673ac1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions webseed-peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ func (ws *webseedPeer) requester(i int) {
ws.updateRequestor.Stop()
ws.updateRequestor = nil
}

if i < ws.maxRequesters && ws.waiting >= ws.maxRequesters {
// we've been woken by a signal - if we are going to exit
// instead of processing we need to pass the signal on
ws.requesterCond.Signal()
}
} else {
// if there are more than one requests in the queue and we don't
// have all of the responders activated yet we need to
Expand Down

0 comments on commit 5673ac1

Please sign in to comment.