Fix AutoShardedClient to work with the new asyncio loop machinery

Fix #7675
This commit is contained in:
Rapptz
2022-03-13 08:05:44 -04:00
parent 049df7c586
commit 8d4f08a5e7
4 changed files with 10 additions and 9 deletions

View File

@@ -546,6 +546,7 @@ class HTTPClient:
# Necessary to get aiohttp to stop complaining about session creation
if self.connector is MISSING:
self.connector = aiohttp.TCPConnector(loop=self.loop, limit=0)
self.__session = aiohttp.ClientSession(
connector=self.connector, ws_response_class=DiscordClientWebSocketResponse, loop=self.loop
)