Skip to content

Commit 7571e2a

Browse files
committed
Raise OperationError after backoff exceeds
1 parent cbe9f6f commit 7571e2a

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)