From cf76edb0dd6788fbcf0636cf339f0b08c71ebe0f Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Wed, 13 May 2020 21:21:22 -0600 Subject: [PATCH] make noise work again --- libp2p/protocols/secure/noise.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libp2p/protocols/secure/noise.nim b/libp2p/protocols/secure/noise.nim index aef2191..e43258c 100644 --- a/libp2p/protocols/secure/noise.nim +++ b/libp2p/protocols/secure/noise.nim @@ -267,12 +267,12 @@ template read_s: untyped = proc receiveHSMessage(sconn: Connection): Future[seq[byte]] {.async.} = var besize: array[2, byte] - await sconn.stream.readExactly(addr besize[0], besize.len) + await sconn.readExactly(addr besize[0], besize.len) let size = uint16.fromBytesBE(besize).int trace "receiveHSMessage", size var buffer = newSeq[byte](size) if buffer.len > 0: - await sconn.stream.readExactly(addr buffer[0], buffer.len) + await sconn.readExactly(addr buffer[0], buffer.len) return buffer proc sendHSMessage(sconn: Connection; buf: seq[byte]) {.async.} =