Skip to content

Commit

Permalink
All exceptions subclassed from OSError now cause connection retry
Browse files Browse the repository at this point in the history
attempts, subject to the connection "retry_count" and "retry_delay"
(#420).
  • Loading branch information
anthony-tuininga committed Dec 6, 2024
1 parent 3f9c4b3 commit cb110f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions doc/src/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Thin Mode Changes
:data:`oracledb.DB_TYPE_LONG` or :data:`oracledb.DB_TYPE_LONG_RAW` to
to a different compatible type
(`issue 424 <https://github.com/oracle/python-oracledb/issues/424>`__).
#) All exceptions subclassed from ``OSError`` now cause connection retry
attempts, subject to the connection ``retry_count`` and ``retry_delay``
parameters
(`issue 420 <https://github.com/oracle/python-oracledb/issues/420>`__).

Thick Mode Changes
++++++++++++++++++
Expand Down
3 changes: 1 addition & 2 deletions src/oracledb/impl/thin/connection.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,7 @@ cdef class ThinConnImpl(BaseThinConnImpl):
try:
protocol._connect_phase_one(self, params, description,
address, connect_string)
except (exceptions.DatabaseError, socket.gaierror,
ConnectionRefusedError) as e:
except (exceptions.DatabaseError, socket.gaierror, OSError) as e:
if raise_exception:
errors._raise_err(errors.ERR_CONNECTION_FAILED, cause=e,
connection_id=description.connection_id)
Expand Down

0 comments on commit cb110f9

Please sign in to comment.