commit 5dd0ab4: [Minor] Restore faster on the first error
Vsevolod Stakhov
vsevolod at highsecure.ru
Wed Mar 17 14:28:06 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-03-17 14:10:31 +0000
URL: https://github.com/rspamd/rspamd/commit/5dd0ab4ad379dd607ad808ca18cdf2b1032ccfb5
[Minor] Restore faster on the first error
---
src/libserver/monitored.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
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",
More information about the Commits
mailing list