diff --git a/libp2p/protocols/secure/secio.nim b/libp2p/protocols/secure/secio.nim index 4d57d80a0..0452feff4 100644 --- a/libp2p/protocols/secure/secio.nim +++ b/libp2p/protocols/secure/secio.nim @@ -195,9 +195,9 @@ method readMessage(sconn: SecioConn): Future[seq[byte]] {.async.} = else: trace "Received message header size is more then allowed", length = length, allowed_length = SecioMaxMessageSize - except AsyncStreamIncompleteError: + except LPStreamIncompleteError: trace "Connection dropped while reading" - except AsyncStreamReadError: + except LPStreamReadError: trace "Error reading from connection" method writeMessage(sconn: SecioConn, message: seq[byte]) {.async.} = diff --git a/tests/testbufferstream.nim b/tests/testbufferstream.nim index 2ea08219b..ee22096b0 100644 --- a/tests/testbufferstream.nim +++ b/tests/testbufferstream.nim @@ -465,7 +465,7 @@ suite "BufferStream": waitFor(pipeTest()) == true test "shouldn't get stuck on close": - proc test(): Future[bool] {.async.} = + proc closeTest(): Future[bool] {.async.} = proc createMessage(tmplate: string, size: int): seq[byte] = result = newSeq[byte](size) for i in 0 ..< len(result): @@ -482,4 +482,5 @@ suite "BufferStream": result = false check: - waitFor(test()) == true \ No newline at end of file + waitFor(closeTest()) == true +