Skip to content

Commit cb110f9

Browse files
All exceptions subclassed from OSError now cause connection retry
attempts, subject to the connection "retry_count" and "retry_delay" (#420).
1 parent 3f9c4b3 commit cb110f9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

doc/src/release_notes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ Thin Mode Changes
2121
:data:`oracledb.DB_TYPE_LONG` or :data:`oracledb.DB_TYPE_LONG_RAW` to
2222
to a different compatible type
2323
(`issue 424 <https://github.com/oracle/python-oracledb/issues/424>`__).
24+
#) All exceptions subclassed from ``OSError`` now cause connection retry
25+
attempts, subject to the connection ``retry_count`` and ``retry_delay``
26+
parameters
27+
(`issue 420 <https://github.com/oracle/python-oracledb/issues/420>`__).
2428

2529
Thick Mode Changes
2630
++++++++++++++++++

src/oracledb/impl/thin/connection.pyx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,7 @@ cdef class ThinConnImpl(BaseThinConnImpl):
331331
try:
332332
protocol._connect_phase_one(self, params, description,
333333
address, connect_string)
334-
except (exceptions.DatabaseError, socket.gaierror,
335-
ConnectionRefusedError) as e:
334+
except (exceptions.DatabaseError, socket.gaierror, OSError) as e:
336335
if raise_exception:
337336
errors._raise_err(errors.ERR_CONNECTION_FAILED, cause=e,
338337
connection_id=description.connection_id)

0 commit comments

Comments
 (0)