Skip to content

Commit

Permalink
Fix bug when detecting in-band notification warning while connection is
Browse files Browse the repository at this point in the history
being created or actively used (#383).
  • Loading branch information
anthony-tuininga committed Aug 22, 2024
1 parent ff80bbc commit 0700bde
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
11 changes: 11 additions & 0 deletions doc/src/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ Release changes are listed as affecting Thin Mode (the default runtime behavior
of python-oracledb), as affecting the optional :ref:`Thick Mode
<enablingthick>`, or as being 'Common' for changes that impact both modes.

oracledb 2.4.1 (August 2024)
----------------------------

Thin Mode Changes
+++++++++++++++++

#) Fixed bug when detecting in-band notification warnings while the connection
is being created or actively used
(`issue 383 <https://github.com/oracle/python-oracledb/issues/383>`__).


oracledb 2.4.0 (August 2024)
----------------------------

Expand Down
4 changes: 3 additions & 1 deletion src/oracledb/impl/thin/packet.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ cdef class ReadBuffer(Buffer):
Checks to see if the transport is connected and throws the appropriate
exception if not.
"""
if self._pending_error_num != 0:
if self._pending_error_num not in (
0, TNS_ERR_SESSION_SHUTDOWN, TNS_ERR_INBAND_MESSAGE
):
if self._transport is not None:
self._transport.disconnect()
self._transport = None
Expand Down
2 changes: 1 addition & 1 deletion src/oracledb/impl/thin/pool.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ cdef class PooledConnRequest:
buf.check_control_packet()
if buf._pending_error_num != 0:
self.pool_impl._drop_conn_impl(conn_impl)
self._open_count -= 1
self.pool_impl._open_count -= 1
else:
self.conn_impl = conn_impl
if self.pool_impl._ping_interval == 0:
Expand Down
2 changes: 1 addition & 1 deletion src/oracledb/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
# file doc/src/conf.py both reference this file directly.
# -----------------------------------------------------------------------------

__version__ = "2.4.0"
__version__ = "2.4.1"

0 comments on commit 0700bde

Please sign in to comment.