set fully reflected if the server indicates it had all of the stream

This commit is contained in:
Jack Robison 2019-01-30 14:58:26 -05:00
parent 6aef6a80b7
commit 05915c540a
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -176,6 +176,9 @@ class ManagedStream:
sent_sd, needed = await protocol.send_descriptor() sent_sd, needed = await protocol.send_descriptor()
if sent_sd: if sent_sd:
sent.append(self.sd_hash) sent.append(self.sd_hash)
if not sent_sd and not needed:
if not self.fully_reflected.is_set():
self.fully_reflected.set()
except (asyncio.CancelledError, asyncio.TimeoutError, ValueError): except (asyncio.CancelledError, asyncio.TimeoutError, ValueError):
if protocol.transport: if protocol.transport:
protocol.transport.close() protocol.transport.close()