From ee0059a65c5c53a35390c1807c250703cf84464d Mon Sep 17 00:00:00 2001 From: Rahim Kanji Date: Tue, 6 Dec 2022 12:02:28 +0500 Subject: [PATCH] Purge all backend connections when monitor is disabled --- lib/MySQL_Monitor.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/MySQL_Monitor.cpp b/lib/MySQL_Monitor.cpp index 8cf3a10d2..78f9016bc 100644 --- a/lib/MySQL_Monitor.cpp +++ b/lib/MySQL_Monitor.cpp @@ -3539,7 +3539,7 @@ __monitor_run: pthread_join(monitor_aws_aurora_thread,NULL); pthread_join(monitor_replication_lag_thread,NULL); - bool purged_all_connections = false; + My_Conn_Pool->purge_all_connections(); while (shutdown==false) { unsigned int glover; @@ -3554,10 +3554,6 @@ __monitor_run: if (mysql_thread___monitor_enabled==true) { goto __monitor_run; } - else if (purged_all_connections == false) { - My_Conn_Pool->purge_all_connections(); - purged_all_connections = true; - } usleep(200000); }