make stream close async

This commit is contained in:
Christophe de Carvalho Pereira Martins
2018-11-18 17:22:17 +01:00
parent 01daf8ae8a
commit 96edf96e76
3 changed files with 10 additions and 6 deletions

View File

@ -34,10 +34,10 @@ class NetStream(INetStream):
"""
return await self.muxed_stream.write(data)
def close(self):
async def close(self):
"""
close stream
:return: true if successful
"""
self.muxed_stream.close()
await self.muxed_stream.close()
return True