diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-03-17 14:10:31 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-03-17 14:10:31 +0000 |
commit | 5dd0ab4ad379dd607ad808ca18cdf2b1032ccfb5 (patch) | |
tree | 148ea6b4ab79e5c22429797ed6e7fec28a256cf2 /src/libserver/monitored.c | |
parent | 5dd8c7f0b6bdbba7f883835a855037678f5767f6 (diff) | |
download | rspamd-5dd0ab4ad379dd607ad808ca18cdf2b1032ccfb5.tar.gz rspamd-5dd0ab4ad379dd607ad808ca18cdf2b1032ccfb5.zip |
[Minor] Restore faster on the first error
Diffstat (limited to 'src/libserver/monitored.c')
-rw-r--r-- | src/libserver/monitored.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libserver/monitored.c b/src/libserver/monitored.c index 47de4a816..7b55b07ec 100644 --- a/src/libserver/monitored.c +++ b/src/libserver/monitored.c @@ -110,7 +110,12 @@ rspamd_monitored_propagate_error (struct rspamd_monitored *m, rspamd_monitored_stop (m); if (m->monitoring_mult > m->ctx->min_monitored_mult) { - m->monitoring_mult /= 2.0; + if (m->monitoring_mult < 1.0) { + m->monitoring_mult = 1.0; + } + else { + m->monitoring_mult /= 2.0; + } } msg_debug_mon ("%s on resolving %s, %d retries left; next check in %.2f", |