From: Vsevolod Stakhov Date: Wed, 23 Mar 2011 15:54:59 +0000 (+0300) Subject: Add throttling timer only once. X-Git-Tag: 0.3.10~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e44e925ca55b65388497ff94b02f018a600d5444;p=rspamd.git Add throttling timer only once. --- 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;