--------------------- PatchSet 310 Date: 2000/05/16 19:44:28 Author: hno Branch: hno-devel Tag: (none) Log: Return an error when the dnsserver queue is overloaded rather than abort with a fatal error. Members: src/dns.c:1.1.1.3.10.2.2.1->1.1.1.3.10.2.2.2 Index: squid/src/dns.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/dns.c,v retrieving revision 1.1.1.3.10.2.2.1 retrieving revision 1.1.1.3.10.2.2.2 diff -u -r1.1.1.3.10.2.2.1 -r1.1.1.3.10.2.2.2 --- squid/src/dns.c 16 May 2000 18:53:53 -0000 1.1.1.3.10.2.2.1 +++ squid/src/dns.c 16 May 2000 19:44:28 -0000 1.1.1.3.10.2.2.2 @@ -1,6 +1,6 @@ /* - * $Id: dns.c,v 1.1.1.3.10.2.2.1 2000/05/16 18:53:53 hno Exp $ + * $Id: dns.c,v 1.1.1.3.10.2.2.2 2000/05/16 19:44:28 hno Exp $ * * DEBUG: section 34 Dnsserver interface * AUTHOR: Harvest Derived @@ -95,6 +95,10 @@ { char buf[256]; snprintf(buf, 256, "%s\n", lookup); + if (dnsservers->stats.queue_size > dnsservers->n_running * 2) { + callback(data, "$fail temporary network problem, pleas retry later"); + debug(34, 1) ("dnsSubmit: queue overload, rejecting %s\n", lookup); + } else helperSubmit(dnsservers, buf, callback, data); }