Skip to content

Commit 240fed0

Browse files
committed
added comment
1 parent e0c1b45 commit 240fed0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

google/api_core/retry/retry_base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ def _retry_error_helper(
214214
raise final_exc from source_exc
215215
if on_error_fn is not None:
216216
on_error_fn(exc)
217+
# next_sleep is fetched after the on_error callback to allow clients
218+
# to update sleep_generator values dynamically in response to errors
217219
try:
218220
next_sleep = next(sleep_generator)
219221
except StopIteration:

0 commit comments

Comments
 (0)