Skip to content

Commit c0644a7

Browse files
authored
Merge pull request #8 from transifex/raise-exception-after-max-backoff
Raise OperationError after backoff exceeds
2 parents cbe9f6f + 7571e2a commit c0644a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hermes/client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def execute_role_based_procedure(self):
266266
self.log.warning('Server is a slave, stopping components')
267267
self._stop_components()
268268
break
269-
except OperationalError:
269+
except OperationalError as e:
270270
self._stop_components()
271271

272272
self.log.warning(
@@ -277,7 +277,7 @@ def execute_role_based_procedure(self):
277277
if backoff: # pragma: no cover
278278
backoff <<= 1
279279
if backoff > 32:
280-
backoff = 1
280+
raise e
281281
else:
282282
backoff = 1
283283
sleep(backoff)

0 commit comments

Comments
 (0)