File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ Thin Mode Changes
1515
1616#) Fixed bug when SQL is executed after first being parsed with Oracle
1717 Database 23c.
18+ #) Fixed bug when timeout is not ``None `` when creating a pool
19+ (`issue 166 <https://github.com/oracle/python-oracledb/issues/166 >`__).
1820#) Replaced regular expressions for parsing SQL with regular expressions that
1921 perform better
2022 (`issue 172 <https://github.com/oracle/python-oracledb/issues/172 >`__).
Original file line number Diff line number Diff line change @@ -328,9 +328,10 @@ cdef class ThinPoolImpl(BasePoolImpl):
328328 current_time = time.monotonic()
329329 while self .get_open_count() > self .min and conn_impls_to_check:
330330 conn_impl = conn_impls_to_check[0 ]
331- if current_time - conn_impl._time_in_pool > self ._timeout:
332- conn_impls_to_check.pop(0 )
333- self ._drop_conn_impl(conn_impl)
331+ if current_time - conn_impl._time_in_pool < self ._timeout:
332+ break
333+ conn_impls_to_check.pop(0 )
334+ self ._drop_conn_impl(conn_impl)
334335
335336 def acquire (self , ConnectParamsImpl params ):
336337 """
You can’t perform that action at this time.
0 commit comments