mirror of https://github.com/vacp2p/nim-libp2p.git
Fix bug in daemonapi length decoding message.
This commit is contained in:
parent
2bf8db9046
commit
0bbd87b536
|
@ -478,6 +478,8 @@ proc recvMessage(conn: StreamTransport): Future[seq[byte]] {.async.} =
|
|||
break
|
||||
if res != VarintStatus.Success or size > MaxMessageSize:
|
||||
buffer.setLen(0)
|
||||
result = buffer
|
||||
return
|
||||
buffer.setLen(size)
|
||||
await conn.readExactly(addr buffer[0], int(size))
|
||||
except TransportIncompleteError:
|
||||
|
|
Loading…
Reference in New Issue