Commit 4c2cf464 authored by Adin Schmahmann's avatar Adin Schmahmann Committed by Steven Allen

check for stopping the query in between dialing and querying

parent dd0bbb2c
......@@ -280,6 +280,11 @@ func (q *qu) queryPeer(ctx context.Context, p peer.ID) *queryResult {
return &queryResult{}
}
if q.stopFn(q.localPeers) {
q.cancel()
return &queryResult{}
}
newPeers, err := q.queryFn(queryCtx, p)
if err != nil {
q.localPeers.Remove(p)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment