diff src/dnsbl.cpp @ 150:a23ef169d322

limit dns resolver timeouts and retry interval
author carl
date Tue, 27 Mar 2007 15:22:07 -0700
parents 9330b8d6a56b
children c7fc218686f5
line wrap: on
line diff
--- a/src/dnsbl.cpp	Mon Feb 19 15:57:24 2007 -0800
+++ b/src/dnsbl.cpp	Tue Mar 27 15:22:07 2007 -0700
@@ -478,6 +478,9 @@
 			snprintf(text, sizeof(text), "process_resolver_requests() has a question %s", question);
 			my_syslog(text);
 		#endif
+		if ((_res.options & RES_INIT) == 0) res_init();
+		_res.retry	 = 2;
+		_res.retrans = RES_TIMEOUT;
 		glom.length = res_search(question, ns_c_in, ns_t_a, glom.answer, sizeof(glom.answer));
 		if (glom.length < 0) glom.length = 0;	// represent all errors as zero length answers
 #else