From: Amos Jeffries Date: Mon, 24 Oct 2011 00:18:26 +0000 (+1300) Subject: Produce full list of peer options on maybe-direct forwarding case X-Git-Tag: BumpSslServerFirst.take01~79 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8b9a89c933efd98c32a6b5cd3584b6bf160ff8ef;p=thirdparty%2Fsquid.git 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. --- 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);