From 8b9a89c933efd98c32a6b5cd3584b6bf160ff8ef Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Mon, 24 Oct 2011 13:18:26 +1300 Subject: [PATCH] Produce full list of peer options on maybe-direct forwarding case Now that we are generating the set of possible peers before attempting to connect. The retry_on_error directive is no longer repeatedly cycling through the peer selecting process failing on one peer until that peer works. The maybe-direct case seems to have been depending on this behaviour to locate alternative peers before going DIRECT. The attached patch seeks to make the maybe-direct case produce a list of all available parents with the specific algorithm choice first. --- src/peer_select.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/peer_select.cc b/src/peer_select.cc index 52e37f87ea..a4546e2fee 100644 --- a/src/peer_select.cc +++ b/src/peer_select.cc @@ -435,8 +435,10 @@ peerSelectFoo(ps_state * ps) if (Config.onoff.prefer_direct) peerGetSomeDirect(ps); - if (request->flags.hierarchical || !Config.onoff.nonhierarchical_direct) + if (request->flags.hierarchical || !Config.onoff.nonhierarchical_direct) { peerGetSomeParent(ps); + peerGetAllParents(ps); + } if (!Config.onoff.prefer_direct) peerGetSomeDirect(ps); -- 2.47.3