From bb277d4b56a52491f7763eebcf2287cb444939b6 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Fri, 4 Oct 2019 10:21:45 -0600 Subject: [PATCH] readLp should warn on ignored exceptions --- libp2p/connection.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libp2p/connection.nim b/libp2p/connection.nim index bc3d4bc..0eeacff 100644 --- a/libp2p/connection.nim +++ b/libp2p/connection.nim @@ -102,7 +102,7 @@ proc readLp*(s: Connection): Future[seq[byte]] {.async, gcsafe.} = if size > 0.uint: await s.readExactly(addr result[0], int(size)) except LPStreamIncompleteError, LPStreamReadError: - error "readLp: could not read from remote", exception = getCurrentExceptionMsg() + warn "readLp: could not read from remote, this is usually ok", exception = getCurrentExceptionMsg() proc writeLp*(s: Connection, msg: string | seq[byte]): Future[void] {.gcsafe.} = ## write lenght prefixed