Add call to wait_closed method of asyncio.StreamWriter

This commit is contained in:
Alex Stokes
2019-08-24 22:06:24 +02:00
parent d9883ee4f0
commit 5b32bfdd3f
6 changed files with 12 additions and 11 deletions

View File

@ -37,5 +37,6 @@ class RawConnection(IRawConnection):
"""
return await self.reader.read(n)
def close(self) -> None:
async def close(self) -> None:
self.writer.close()
await self.writer.wait_closed()

View File

@ -17,5 +17,5 @@ class IRawConnection(ABC):
pass
@abstractmethod
def close(self) -> None:
async def close(self) -> None:
pass