Skip to content

Commit

Permalink
Raise OperationError after backoff exceeds
Browse files Browse the repository at this point in the history
  • Loading branch information
fathineos committed Feb 12, 2024
1 parent cbe9f6f commit 7571e2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hermes/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def execute_role_based_procedure(self):
self.log.warning('Server is a slave, stopping components')
self._stop_components()
break
except OperationalError:
except OperationalError as e:
self._stop_components()

self.log.warning(
Expand All @@ -277,7 +277,7 @@ def execute_role_based_procedure(self):
if backoff: # pragma: no cover
backoff <<= 1
if backoff > 32:
backoff = 1
raise e
else:
backoff = 1
sleep(backoff)
Expand Down

0 comments on commit 7571e2a

Please sign in to comment.