Skip to content

Commit 659cf35

Browse files
Fixed bug that would cause an internal error to be raised when
attempting to close a connection that has been forcibly closed by the database.
1 parent b9f4d5f commit 659cf35

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

doc/src/release_notes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Thin Mode Changes
2020
#) Fixed bug in handling invisible columns with object type names containing
2121
``%ROWTYPE``
2222
(`issue 325 <https://github.com/oracle/python-oracledb/issues/325>`__).
23+
#) Fixed bug that would cause an internal error to be raised when attempting
24+
to close a connection that has been forcibly closed by the database.
2325
#) Internal change: further efforts to tighten code looking for the end of a
2426
database request made to Oracle Database 23c.
2527

src/oracledb/impl/thin/protocol.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ cdef class Protocol(BaseProtocol):
157157
with self._request_lock:
158158

159159
# if a read failed on the socket earlier, clear the socket
160-
if self._read_buf._transport is None:
160+
if self._read_buf._transport is None \
161+
or self._read_buf._transport._transport is None:
161162
self._transport = None
162163

163164
# if the session was marked as needing to be closed, force it

0 commit comments

Comments
 (0)