Fix potential chunking woe.

This commit is contained in:
Rapptz 2017-01-23 07:08:29 -05:00
parent d409196d3d
commit f06024f236

View File

@ -487,8 +487,8 @@ class ConnectionState:
@asyncio.coroutine
def _chunk_and_dispatch(self, server, unavailable):
yield from self.chunker(server)
chunks = list(self.chunks_needed(server))
yield from self.chunker(server)
if chunks:
try:
yield from asyncio.wait(chunks, timeout=len(chunks), loop=self.loop)