mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-04-02 20:11:28 +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:
@ -160,7 +160,7 @@ class Mplex(IMuxedConn):
|
||||
|
||||
return await self.write_to_stream(_bytes)
|
||||
|
||||
async def write_to_stream(self, _bytes: bytes) -> int:
|
||||
async def write_to_stream(self, _bytes: bytes) -> None:
|
||||
"""
|
||||
writes a byte array to a secured connection.
|
||||
|
||||
@ -174,8 +174,6 @@ class Mplex(IMuxedConn):
|
||||
"failed to write message to the underlying connection"
|
||||
) from e
|
||||
|
||||
return len(_bytes)
|
||||
|
||||
async def handle_incoming(self) -> None:
|
||||
"""Read a message off of the secured connection and add it to the
|
||||
corresponding message buffer."""
|
||||
|
||||
Reference in New Issue
Block a user