| author | Vincent Bernat <bernat@luffy.cx> | 2009-11-24 12:59:43 (GMT) |
|---|---|---|
| committer | Vincent Bernat <bernat@luffy.cx> | 2009-11-24 12:59:43 (GMT) |
| commit | 60c706cb661f9f0b554f7e177101d44e64a53423 (patch) | |
| tree | a0726f1c3a35856dba5a8c4c7ad54d185cb004f7 | |
| parent | 2018947b0dda63c7ec063ab20639f4dde36286a8 (diff) | |
| download | keepalived-60c706cb661f9f0b554f7e177101d44e64a53423.zip keepalived-60c706cb661f9f0b554f7e177101d44e64a53423.tar.gz | |
Fix SMTP checker adding himself repeatedly in the list of failed checkers
When a SMTP check has already failed, SMTP checker will add itself
again to the list of failed checks. For example, if the check fails 10
times in a row, the SMTP check will be present 10 times in the list of
failed checks. This means that to be considered alive again, it should
succeed 10 times.
Other checkers just add themselves to the list of failed checkers only
if they are not already present. We do the same here.
| -rw-r--r-- | keepalived/check/check_smtp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/keepalived/check/check_smtp.c b/keepalived/check/check_smtp.c index 29c55e8..edae298 100644 --- a/keepalived/check/check_smtp.c +++ b/keepalived/check/check_smtp.c @@ -329,10 +329,9 @@ smtp_final(thread *thread_obj, int error, const char *format, ...) smtp_buff[542 - 1] = '\0'; smtp_alert(chk->rs, NULL, NULL, "DOWN", smtp_buff); + update_svr_checker_state(DOWN, chk->id, chk->vs, chk->rs); } - update_svr_checker_state(DOWN, chk->id, chk->vs, chk->rs); - /* Reset everything back to the first host in the list */ smtp_chk->attempts = 0; smtp_chk->host_ctr = 0; |
