From 3280e9d62821c057ac695f509f15de590b8206ed Mon Sep 17 00:00:00 2001 From: wessels <> Date: Wed, 4 Oct 2000 07:12:48 +0000 Subject: [PATCH] DW: - It was wrong to set the dont_retry flag in fwdConnectDone when we can't look up the IP address of a neighbor cache. Its likely that there is an option to connect directly to the origin server, so forward.c should keep trying, rather than giving up so quickly. Now we only set dont_retry if we fail to look up the origin server IP address. --- src/forward.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/forward.cc b/src/forward.cc index 5e11d4ef4a..0190efad04 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -1,6 +1,6 @@ /* - * $Id: forward.cc,v 1.73 2000/05/12 00:29:07 wessels Exp $ + * $Id: forward.cc,v 1.74 2000/10/04 01:12:48 wessels Exp $ * * DEBUG: section 17 Request Forwarding * AUTHOR: Duane Wessels @@ -167,7 +167,13 @@ fwdConnectDone(int server_fd, int status, void *data) current = fwdState; assert(fwdState->server_fd == server_fd); if (status == COMM_ERR_DNS) { - fwdState->flags.dont_retry = 1; + /* + * Only set the dont_retry flag if the DNS lookup fails on + * a direct connection. If DNS lookup fails when trying + * a neighbor cache, we may want to retry another option. + */ + if (NULL == fs->peer) + fwdState->flags.dont_retry = 1; debug(17, 4) ("fwdConnectDone: Unknown host: %s\n", request->host); err = errorCon(ERR_DNS_FAIL, HTTP_SERVICE_UNAVAILABLE); -- 2.47.3