diff --git a/discord/client.py b/discord/client.py index 8ece21cf94..1520952f04 100644 --- a/discord/client.py +++ b/discord/client.py @@ -714,6 +714,7 @@ async def close(self) -> None: if self._closed: return + await self.http.close() self._closed = True for voice in self.voice_clients: @@ -726,7 +727,6 @@ async def close(self) -> None: if self.ws is not None and self.ws.open: await self.ws.close(code=1000) - await self.http.close() self._ready.clear() def clear(self) -> None: