This commit is contained in:
Jack Robison 2019-01-28 22:38:17 -05:00
parent cefe3eb520
commit 418def56ac
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -98,9 +98,9 @@ class BlobExchangeClientProtocol(asyncio.Protocol):
msg = f"downloading {self.blob.blob_hash[:8]} from {self.peer_address}:{self.peer_port}," \ msg = f"downloading {self.blob.blob_hash[:8]} from {self.peer_address}:{self.peer_port}," \
f" timeout in {self.peer_timeout}" f" timeout in {self.peer_timeout}"
log.debug(msg) log.debug(msg)
msg = f"downloaded {self.blob.blob_hash[:8]} from {self.peer_address}:{self.peer_port}"
await asyncio.wait_for(self.writer.finished, self.peer_timeout, loop=self.loop) await asyncio.wait_for(self.writer.finished, self.peer_timeout, loop=self.loop)
await self.blob.finished_writing.wait() await self.blob.finished_writing.wait()
msg = f"downloaded {self.blob.blob_hash[:8]} from {self.peer_address}:{self.peer_port}"
log.info(msg) log.info(msg)
return True, True return True, True
except asyncio.CancelledError: except asyncio.CancelledError: