diff options
| author | Rapptz <[email protected]> | 2021-04-06 07:31:31 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-04-06 07:31:31 -0400 |
| commit | 7e3c5f3fafe558e7bf6298b5d593492ad2793359 (patch) | |
| tree | f00d10ccb2596aecd135d6acaa2520ebb303fb37 | |
| parent | Remove unused group functionality (diff) | |
| download | discord.py-7e3c5f3fafe558e7bf6298b5d593492ad2793359.tar.xz discord.py-7e3c5f3fafe558e7bf6298b5d593492ad2793359.zip | |
Fix some regressions from create_task change
| -rw-r--r-- | discord/state.py | 2 | ||||
| -rw-r--r-- | discord/utils.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/discord/state.py b/discord/state.py index 82f5371c..8374b30e 100644 --- a/discord/state.py +++ b/discord/state.py @@ -1118,7 +1118,7 @@ class AutoShardedConnectionState(ConnectionState): current_bucket = [] # Chunk the guild in the background while we wait for GUILD_CREATE streaming - future = asyncio.create_task(self.chunk_guild(guild)) + future = asyncio.ensure_future(self.chunk_guild(guild)) current_bucket.append(future) else: future = self.loop.create_future() diff --git a/discord/utils.py b/discord/utils.py index fec7b5c0..03478b3f 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -369,7 +369,7 @@ async def async_all(gen, *, check=_isawaitable): async def sane_wait_for(futures, *, timeout): ensured = [ - asyncio.create_task(fut) for fut in futures + asyncio.ensure_future(fut) for fut in futures ] done, pending = await asyncio.wait(ensured, timeout=timeout, return_when=asyncio.ALL_COMPLETED) |