File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ Thin Mode Changes
1717 (`issue 276 <https://github.com/oracle/python-oracledb/issues/276 >`__).
1818#) Added support for the asynchronous context manager protocol on the
1919 AsyncCursor class as a convenience.
20+ #) Fixed regression when connecting to a database using listener redirects
21+ with either a connection pool or using asyncio
22+ (`issue 275 <https://github.com/oracle/python-oracledb/issues/275 >`__).
2023#) Fixed bug with intermittent hang on some versions of Oracle Database when
2124 using asyncio and the database raises an error and output variables are
2225 present
Original file line number Diff line number Diff line change @@ -304,8 +304,12 @@ cdef class Protocol(BaseProtocol):
304304 self ._process_message(auth_message)
305305
306306 # mark protocol to indicate that connect is no longer in progress; this
307- # allows the normal break/reset mechanism to fire
307+ # allows the normal break/reset mechanism to fire; also mark the
308+ # session as not needing to be closed since for listener redirects
309+ # the packet may indicate EOF for the initial connection that is
310+ # established
308311 conn_impl.warning = auth_message.warning
312+ self ._read_buf._session_needs_to_be_closed = False
309313 self ._in_connect = False
310314
311315 cdef int _connect_tcp(self , ConnectParamsImpl params,
@@ -874,9 +878,12 @@ cdef class BaseAsyncProtocol(BaseProtocol):
874878 def connection_lost (self , exc ):
875879 """
876880 Called when a connection has been lost. The presence of an exception
877- indicates an abornmal loss of the connection.
881+ indicates an abornmal loss of the connection. If in the process of
882+ establishing a connection, losing the connection is ignored since this
883+ can happen normally when a listener redirect is encountered.
878884 """
879- self ._transport = None
885+ if not self ._in_connect:
886+ self ._transport = None
880887
881888 def data_received (self , data ):
882889 """
You can’t perform that action at this time.
0 commit comments