From 97eb19c0f0e92ba33a6d1086e5b36e0e9dde4713 Mon Sep 17 00:00:00 2001 From: Wazir Ahmed Date: Fri, 1 Aug 2025 10:47:55 +0530 Subject: [PATCH] fix: Close idle session based on effective timeout - effective_timeout = min (mysql-wait_timeout, session-wait_timeout) Signed-off-by: Wazir Ahmed --- lib/MySQL_Thread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MySQL_Thread.cpp b/lib/MySQL_Thread.cpp index 514c68249..d12c739b7 100644 --- a/lib/MySQL_Thread.cpp +++ b/lib/MySQL_Thread.cpp @@ -3808,7 +3808,7 @@ void MySQL_Thread::ProcessAllSessions_MaintenanceLoop(MySQL_Session *sess, unsig } } else { // the session is idle, kill it - if (sess_time/1000 > (unsigned long long)sess->wait_timeout) { + if (sess_time/1000 > effective_wait_timeout) { sess->killed=true; if (sess->client_myds) { proxy_warning("Killing client connection %s:%d because inactive for %llums\n",sess->client_myds->addr.addr,sess->client_myds->addr.port, sess_time/1000);