From e5c5695399ecb1daffda6903d26cf0ab0f8b3f70 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 7 Apr 2017 23:23:48 -0400 Subject: [PATCH] Proper recursion when launching shards. --- discord/shard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/shard.py b/discord/shard.py index 970f151de..723bc5daf 100644 --- a/discord/shard.py +++ b/discord/shard.py @@ -179,7 +179,7 @@ class AutoShardedClient(Client): except Exception as e: log.info('Failed to connect for shard_id: %s. Retrying...' % shard_id) yield from asyncio.sleep(5.0, loop=self.loop) - yield from self.launch_shard(gateway, shard_id) + return (yield from self.launch_shard(gateway, shard_id)) ws.token = self.http.token ws._connection = self.connection