Skip to content

Commit 73dedb1

Browse files
Rewind requests before retrying them
1 parent a12199d commit 73dedb1

File tree

1 file changed

+2
-0
lines changed
  • codegen/smithy-python-codegen/src/main/java/software/amazon/smithy/python/codegen

1 file changed

+2
-0
lines changed

codegen/smithy-python-codegen/src/main/java/software/amazon/smithy/python/codegen/ClientGenerator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,8 @@ async def _handle_execution(
334334
except SmithyRetryException:
335335
raise context_with_response.response
336336
await sleep(retry_token.retry_delay)
337+
if (seek := getattr(context_with_transport_request.transport_request.body, "seek")) is not None:
338+
await seek(0)
337339
else:
338340
# Step 8: Invoke record_success
339341
retry_strategy.record_success(token=retry_token)

0 commit comments

Comments
 (0)