mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-11 04:17:58 +00:00
Fix some regressions from create_task change
This commit is contained in:
parent
d69b2f0af5
commit
7e3c5f3faf
@ -1118,7 +1118,7 @@ class AutoShardedConnectionState(ConnectionState):
|
|||||||
current_bucket = []
|
current_bucket = []
|
||||||
|
|
||||||
# Chunk the guild in the background while we wait for GUILD_CREATE streaming
|
# 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)
|
current_bucket.append(future)
|
||||||
else:
|
else:
|
||||||
future = self.loop.create_future()
|
future = self.loop.create_future()
|
||||||
|
@ -369,7 +369,7 @@ async def async_all(gen, *, check=_isawaitable):
|
|||||||
|
|
||||||
async def sane_wait_for(futures, *, timeout):
|
async def sane_wait_for(futures, *, timeout):
|
||||||
ensured = [
|
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)
|
done, pending = await asyncio.wait(ensured, timeout=timeout, return_when=asyncio.ALL_COMPLETED)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user