We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0baf7c commit 62b515eCopy full SHA for 62b515e
1 file changed
mautrix/client/api/modules/media_repository.py
@@ -304,7 +304,7 @@ async def _upload_to_url(
304
)
305
upload_response.raise_for_status()
306
except Exception as e:
307
- if retry_count == 0:
+ if retry_count <= 0:
308
raise make_request_error(
309
http_status=upload_response.status if upload_response else -1,
310
text=(await upload_response.text()) if upload_response else "",
@@ -317,7 +317,7 @@ async def _upload_to_url(
317
318
await asyncio.sleep(backoff)
319
backoff *= 2
320
- retry_count = -1
+ retry_count -= 1
321
else:
322
break
323
0 commit comments