Skip to content

Commit

Permalink
Connect using resume_gateway_url
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorukyum committed Aug 10, 2022
1 parent edc605d commit f71b47f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion discord/shard.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,11 @@ async def reidentify(self, exc: ReconnectWebSocket) -> None:
async def reconnect(self) -> None:
self._cancel_task()
try:
coro = DiscordWebSocket.from_client(self._client, shard_id=self.id)
coro = DiscordWebSocket.from_client(
self._client,
gateway=self.ws.resume_gateway_url,
shard_id=self.id,
)
self.ws = await asyncio.wait_for(coro, timeout=60.0)
except self._handled_exceptions as e:
await self._handle_disconnect(e)
Expand Down

0 comments on commit f71b47f

Please sign in to comment.