From acbedfb4b31d15e51bf2df363c6fd12c0908fa3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Thu, 21 Mar 2024 17:37:20 +0000 Subject: [PATCH] Call housekeeping_before_pkts() only if hgs_expired_conns.size() --- lib/MySQL_Session.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/MySQL_Session.cpp b/lib/MySQL_Session.cpp index 644c14d50..d2b034c5c 100644 --- a/lib/MySQL_Session.cpp +++ b/lib/MySQL_Session.cpp @@ -5294,7 +5294,9 @@ int MySQL_Session::handler() { } } - housekeeping_before_pkts(); + // housekeeping_before_pkts() performs tasks only if hgs_expired_conns.size() is not 0 + if (hgs_expired_conns.size() != 0) + housekeeping_before_pkts(); // The function get_pkts_from_client() is called to retrieve packets from the client, passing a reference to wrong_pass and the pkt variable. handler_ret = get_pkts_from_client(wrong_pass, pkt); // If get_pkts_from_client() returns a non-zero value, indicating an error, the function returns that value immediately.