From 29a3b916ae6e29637bef8940e89eafc7a26686a2 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Thu, 7 Oct 2010 10:39:40 +0000 Subject: [PATCH] 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. --- src/janitor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/janitor.c b/src/janitor.c index 85321f7..ae0a6a8 100644 --- a/src/janitor.c +++ b/src/janitor.c @@ -347,6 +347,8 @@ static void pool_client_maint(PgPool *pool) statlist_for_each_safe(item, &pool->waiting_client_list, tmp) { client = container_of(item, PgSocket, head); age = now - client->connect_time; + if (!client->wait_for_welcome) + continue; if (age > cf_client_login_timeout) disconnect_client(client, true, "client_login_timeout (server down)"); } -- 2.11.4.GIT