From: Amos Jeffries Date: Fri, 23 Jan 2009 02:07:48 +0000 (+1300) Subject: Author: Adrian Chadd X-Git-Tag: SQUID_3_2_0_1~1249 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5eee4ac6488c4a66eb1e48a78e64cbd279c54e81;p=thirdparty%2Fsquid.git Author: Adrian Chadd Bug 2558: pt 1: Connect forwarding setting error too early This does not appear to be all of the cause of 2558, but its part of the problem anyway. Request forwarding should not be setting a connection failed error page until all attempts at making a connection have failed. This patch does not correct the place its being set, but clears err before re-trying a connection. From IRC: (13:09:03) adri: no idea about v4-only hostnames but the bug is still valid; you're creating errors on the connect fail, but not clearing them before the next connect --- diff --git a/src/forward.cc b/src/forward.cc index 7d20e19bdd..a03a8fa014 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -527,6 +527,10 @@ FwdState::retryOrBail() } } + /* Ditch error page if it was created before. + * A new one will be created if there's another problem */ + err = NULL; + /* use eventAdd to break potential call sequence loops and to slow things down a little */ eventAdd("fwdConnectStart", fwdConnectStartWrapper, this, originserver ? 0.05 : 0.005, 0);