aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/exts/utils/ping.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/exts/utils/ping.py b/bot/exts/utils/ping.py
index 58485fc34..c6d7bd900 100644
--- a/bot/exts/utils/ping.py
+++ b/bot/exts/utils/ping.py
@@ -39,9 +39,9 @@ class Latency(commands.Cog):
bot_ping = f"{bot_ping:.{ROUND_LATENCY}f} ms"
try:
- request = await self.bot.http_session.get(f"{URLs.site_api_schema}{URLs.site_api}/healthcheck")
- request.raise_for_status()
- site_status = "Healthy"
+ async with self.bot.http_session.get(f"{URLs.site_api_schema}{URLs.site_api}/healthcheck") as request:
+ request.raise_for_status()
+ site_status = "Healthy"
except client_exceptions.ClientResponseError as e:
"""The site returned an unexpected response."""