From: hno <> Date: Thu, 15 Nov 2001 08:15:45 +0000 (+0000) Subject: Bugzilla 224: ICP FIRST_PARENT selection fails if rtt is 0 X-Git-Tag: SQUID_3_0_PRE1~1290 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f97864c436c55d772189ad3284fdc86a40bfb8e;p=thirdparty%2Fsquid.git Bugzilla 224: ICP FIRST_PARENT selection fails if rtt is 0 --- diff --git a/src/peer_select.cc b/src/peer_select.cc index d5b31b9c46..1309c62d1a 100644 --- a/src/peer_select.cc +++ b/src/peer_select.cc @@ -1,6 +1,6 @@ /* - * $Id: peer_select.cc,v 1.116 2001/10/17 20:25:02 hno Exp $ + * $Id: peer_select.cc,v 1.117 2001/11/15 01:15:45 hno Exp $ * * DEBUG: section 44 Peer Selection Algorithm * AUTHOR: Duane Wessels @@ -535,7 +535,8 @@ peerIcpParentMiss(peer * p, icp_common_t * header, ps_state * ps) if (ps->closest_parent_miss.sin_addr.s_addr != any_addr.s_addr) return; rtt = tvSubMsec(ps->ping.start, current_time) / p->weight; - if (ps->ping.w_rtt == 0 || rtt < ps->ping.w_rtt) { + if (ps->first_parent_miss.sin_addr.s_addr == any_addr.s_addr || + rtt < ps->ping.w_rtt) { ps->first_parent_miss = p->in_addr; ps->ping.w_rtt = rtt; }