From e44e925ca55b65388497ff94b02f018a600d5444 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 23 Mar 2011 18:54:59 +0300 Subject: [PATCH] Add throttling timer only once. --- src/dns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dns.c b/src/dns.c index 798f4250d..52fe0a9f0 100644 --- a/src/dns.c +++ b/src/dns.c @@ -976,7 +976,7 @@ dns_throttling_cb (gint fd, short what, void *arg) static void dns_check_throttling (struct rspamd_dns_resolver *resolver) { - if (resolver->errors > resolver->max_errors) { + if (resolver->errors > resolver->max_errors && !resolver->throttling) { msg_info ("starting DNS throttling after %ud errors", resolver->errors); /* Init throttling timeout */ resolver->throttling = TRUE; -- 2.39.5