diff --git a/twitch.py b/twitch.py index 1fdb211..6ed084a 100644 --- a/twitch.py +++ b/twitch.py @@ -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):