summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-03-23 18:54:59 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-03-23 18:54:59 +0300
commite44e925ca55b65388497ff94b02f018a600d5444 (patch)
tree0975df0ce700395e7e697e0ea1bd8d8fe67be509
parent1d4a64659b490140eae991bcc46ce8d8cdf3ab42 (diff)
downloadrspamd-e44e925ca55b65388497ff94b02f018a600d5444.tar.gz
rspamd-e44e925ca55b65388497ff94b02f018a600d5444.zip
Add throttling timer only once.
-rw-r--r--src/dns.c2
1 files changed, 1 insertions, 1 deletions
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;