fix blocking on data being written for resumed streams

This commit is contained in:
Jack Robison 2019-02-15 17:35:46 -05:00
parent 32b4405a4c
commit fd081496c0
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -97,7 +97,7 @@ class StreamManager:
stream.update_status('running') stream.update_status('running')
stream.start_download(self.node) stream.start_download(self.node)
try: try:
await asyncio.wait_for(self.loop.create_task(stream.downloader.got_descriptor.wait()), await asyncio.wait_for(self.loop.create_task(stream.downloader.wrote_bytes_event.wait()),
self.config.download_timeout) self.config.download_timeout)
except asyncio.TimeoutError: except asyncio.TimeoutError:
await self.stop_stream(stream) await self.stop_stream(stream)