mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Change default value of read()
From `n = -1` to `n = None`, to comply with trio API
This commit is contained in:
@ -39,7 +39,7 @@ class InsecureSession(BaseSession):
|
||||
await self.conn.write(data)
|
||||
return len(data)
|
||||
|
||||
async def read(self, n: int = -1) -> bytes:
|
||||
async def read(self, n: int = None) -> bytes:
|
||||
return await self.conn.read(n)
|
||||
|
||||
async def close(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user