From cdeb02c571d49d26cf2e3d79305dff5a3618384e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Sat, 27 Feb 2016 21:33:18 +0000 Subject: [PATCH] Empty commit --- lib/MySQL_Monitor.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/MySQL_Monitor.cpp b/lib/MySQL_Monitor.cpp index 9e3a88ff3..e6caab3bb 100644 --- a/lib/MySQL_Monitor.cpp +++ b/lib/MySQL_Monitor.cpp @@ -138,6 +138,14 @@ __purge_all: lst->pop_front(); purge_lst->push_back(my); } + } else { + // try to keep maximum 2 free connections + // dropping all the others + while(lst->size() > 2) { + my=lst->front(); + lst->pop_front(); + purge_lst->push_back(my); + } } } }