]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login-proxy: Fixed "Host is down" never reseting itself.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 21 Sep 2016 17:50:24 +0000 (20:50 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 21 Sep 2016 18:58:51 +0000 (21:58 +0300)
Broken by c8eb8314a, which moved adding num_waiting_connections earlier.
After that it was never 0 at the check time.

src/login-common/login-proxy.c

index f0fcf78947ef42b25fae1402b167b941b300cd5e..751cb2dd42affa3805f41aa4c9a22a4030413e16 100644 (file)
@@ -392,7 +392,7 @@ static int login_proxy_connect(struct login_proxy *proxy)
        }
        if (timeval_cmp(&rec->last_failure, &rec->last_success) > 0 &&
            rec->last_failure.tv_sec - rec->last_success.tv_sec > PROXY_IMMEDIATE_FAILURE_SECS &&
-           rec->num_waiting_connections != 0) {
+           rec->num_waiting_connections > 1) {
                /* the server is down. fail immediately */
                client_log_err(proxy->client, t_strdup_printf(
                        "proxy(%s): Host %s:%u is down",