Skip to content

Commit

Permalink
login-proxy: Fixed "Host is down" never reseting itself.
Browse files Browse the repository at this point in the history
Broken by c8eb831, which moved adding num_waiting_connections earlier.
After that it was never 0 at the check time.
  • Loading branch information
sirainen committed Sep 21, 2016
1 parent 1d4f019 commit 2e5e204
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/login-common/login-proxy.c
Expand Up @@ -387,7 +387,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",
Expand Down

0 comments on commit 2e5e204

Please sign in to comment.