]> source.dussan.org Git - rspamd.git/commitdiff
Add throttling timer only once.
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Wed, 23 Mar 2011 15:54:59 +0000 (18:54 +0300)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Wed, 23 Mar 2011 15:54:59 +0000 (18:54 +0300)
src/dns.c

index 798f4250d7faadec8d78c58c76826dff960f1c7b..52fe0a9f0f7064d6e1ccfa3e2594f7eb807a526b 100644 (file)
--- 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;