diff --git a/aioboto3/s3/inject.py b/aioboto3/s3/inject.py index 4f512b6..ffb7b3b 100644 --- a/aioboto3/s3/inject.py +++ b/aioboto3/s3/inject.py @@ -263,7 +263,7 @@ async def file_reader() -> None: nonlocal exception part = 0 eof = False - while not eof: + while not exception and not eof: part += 1 multipart_payload = bytearray() loop_counter = 0