mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Change async def write
To return `None` instead of `int. `Writer.write` *does* write all data in all use case.
This commit is contained in:
@ -31,9 +31,8 @@ class MsgIOWriter(WriteCloser):
|
||||
def __init__(self, write_closer: WriteCloser) -> None:
|
||||
self.write_closer = write_closer
|
||||
|
||||
async def write(self, data: bytes) -> int:
|
||||
async def write(self, data: bytes) -> None:
|
||||
await self.write_msg(data)
|
||||
return len(data)
|
||||
|
||||
async def write_msg(self, msg: bytes) -> None:
|
||||
data = encode_msg_with_length(msg)
|
||||
|
||||
Reference in New Issue
Block a user