mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Merge branch 'master' into fix/detection-of-close
This commit is contained in:
@ -59,10 +59,6 @@ def encode_varint_prefixed(msg_bytes: bytes) -> bytes:
|
||||
async def read_varint_prefixed_bytes(reader: Reader) -> bytes:
|
||||
len_msg = await decode_uvarint_from_stream(reader)
|
||||
data = await read_exactly(reader, len_msg)
|
||||
if len(data) != len_msg:
|
||||
raise ValueError(
|
||||
f"failed to read enough bytes: len_msg={len_msg}, data={data!r}"
|
||||
)
|
||||
return data
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user