summaryrefslogtreecommitdiffstats
path: root/src/dns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dns.c')
-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;