mirror of
https://github.com/rangermix/TwitchDropsMiner.git
synced 2026-06-04 11:29:38 +00:00
Pre-read the response to avoid getting errors outside of the context manager
This commit is contained in:
@@ -1027,6 +1027,8 @@ class Twitch:
|
||||
logger.debug(f"Response: {response.status}: {response}")
|
||||
if response.status >= 500:
|
||||
self.print(_("error", "site_down").format(seconds=round(delay)))
|
||||
# pre-read the response to avoid getting errors outside of the context manager
|
||||
await response.read()
|
||||
yield response
|
||||
return
|
||||
except (aiohttp.ClientConnectionError, asyncio.TimeoutError):
|
||||
|
||||
Reference in New Issue
Block a user