Skip to content

Commit 0700bde

Browse files
Fix bug when detecting in-band notification warning while connection is
being created or actively used (#383).
1 parent ff80bbc commit 0700bde

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

Diff for: doc/src/release_notes.rst

+11
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ Release changes are listed as affecting Thin Mode (the default runtime behavior
1111
of python-oracledb), as affecting the optional :ref:`Thick Mode
1212
<enablingthick>`, or as being 'Common' for changes that impact both modes.
1313

14+
oracledb 2.4.1 (August 2024)
15+
----------------------------
16+
17+
Thin Mode Changes
18+
+++++++++++++++++
19+
20+
#) Fixed bug when detecting in-band notification warnings while the connection
21+
is being created or actively used
22+
(`issue 383 <https://github.com/oracle/python-oracledb/issues/383>`__).
23+
24+
1425
oracledb 2.4.0 (August 2024)
1526
----------------------------
1627

Diff for: src/oracledb/impl/thin/packet.pyx

+3-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,9 @@ cdef class ReadBuffer(Buffer):
219219
Checks to see if the transport is connected and throws the appropriate
220220
exception if not.
221221
"""
222-
if self._pending_error_num != 0:
222+
if self._pending_error_num not in (
223+
0, TNS_ERR_SESSION_SHUTDOWN, TNS_ERR_INBAND_MESSAGE
224+
):
223225
if self._transport is not None:
224226
self._transport.disconnect()
225227
self._transport = None

Diff for: src/oracledb/impl/thin/pool.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ cdef class PooledConnRequest:
853853
buf.check_control_packet()
854854
if buf._pending_error_num != 0:
855855
self.pool_impl._drop_conn_impl(conn_impl)
856-
self._open_count -= 1
856+
self.pool_impl._open_count -= 1
857857
else:
858858
self.conn_impl = conn_impl
859859
if self.pool_impl._ping_interval == 0:

Diff for: src/oracledb/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@
3030
# file doc/src/conf.py both reference this file directly.
3131
# -----------------------------------------------------------------------------
3232

33-
__version__ = "2.4.0"
33+
__version__ = "2.4.1"

0 commit comments

Comments
 (0)