Fix for CONPY-245:

Instead of iterating through all connections and checking the health
status via ping, used and unused connections were separated in different
lists. This ensures that the last used connection will be always the first.
This commit is contained in:
Georg Richter
2023-02-01 09:33:54 +01:00
parent 84967a90ca
commit 7daab2feb5
3 changed files with 56 additions and 31 deletions

View File

@ -51,10 +51,9 @@ class Connection(mariadb._mariadb.connection):
"""
self._socket = None
self.__in_use = 0
self._used = 0
self._last_executed_statement = None
self._socket = None
self.__in_use = 0
self.__pool = None
self.__last_used = 0
self.tpc_state = TPC_STATE.NONE