From: Marko Kreen Date: Thu, 7 Oct 2010 10:30:47 +0000 (+0300) Subject: client_login_timeout: check wait_for_welcome X-Git-Tag: pgbouncer_1_4_rc3~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e0a4ea415b4b2b3e1f9877ebc6aafeb03a0d9729;p=pgbouncer client_login_timeout: check wait_for_welcome When rebooting, then pool->welcome_msg_ready=0 does not mean that ->waiting_client_list will contain only new connections. --- diff --git a/src/janitor.c b/src/janitor.c index 3fe49ba..bed166d 100644 --- a/src/janitor.c +++ b/src/janitor.c @@ -346,6 +346,8 @@ static void pool_client_maint(PgPool *pool) if (cf_client_login_timeout > 0 && !pool->welcome_msg_ready) { statlist_for_each_safe(item, &pool->waiting_client_list, tmp) { client = container_of(item, PgSocket, head); + if (!client->wait_for_welcome) + continue; age = now - client->connect_time; if (age > cf_client_login_timeout) disconnect_client(client, true, "client_login_timeout (server down)");