diff --git a/libp2p/daemon/daemonapi.nim b/libp2p/daemon/daemonapi.nim index 08798b3..c15ee8b 100644 --- a/libp2p/daemon/daemonapi.nim +++ b/libp2p/daemon/daemonapi.nim @@ -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: