You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid closing connections twice when driver is closed
When closed, driver purges all connections from the connection pool
and then closes all connections stored in an internal array of all
alive connections. First step is needed to close all connections
that are idle in the connection pool. Second step is needed to close
all connections that are active and checked out of the connection pool.
Note that list of all connections contains both idle and active
connections.
Driver used to purge the pool at the same time as going over the list
of all connections. This made it close some idle connections twice.
It did not cause any issues but resulted in a bit weird logging where
`Connection.close()` operation was logged twice.
This commit fixes the problem by making driver first purge the pool and
then go over the list of all connections to close them.
0 commit comments