Skip to content

Commit 9227b58

Browse files
Ensure that if the transport is closed during the read of packets that
no further attempts are made to use that transport.
1 parent afddb4c commit 9227b58

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/oracledb/impl/thin/protocol.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,8 @@ cdef class Protocol(BaseProtocol):
375375
except Exception as e:
376376
if not self._in_connect \
377377
and self._write_buf._packet_sent \
378-
and self._read_buf._transport is not None:
378+
and self._read_buf._transport is not None \
379+
and self._read_buf._transport._transport is not None:
379380
self._send_marker(self._write_buf, TNS_MARKER_TYPE_BREAK)
380381
self._reset(message)
381382
raise

0 commit comments

Comments
 (0)