From b8c54068a3f2e783a7fb9f762304880e104a0364 Mon Sep 17 00:00:00 2001 From: Tanguy Date: Fri, 26 Nov 2021 13:55:35 +0100 Subject: [PATCH] Handle websock exceptions in handle (#658) --- libp2p/transports/wstransport.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libp2p/transports/wstransport.nim b/libp2p/transports/wstransport.nim index e68331c25..3a8a5c779 100644 --- a/libp2p/transports/wstransport.nim +++ b/libp2p/transports/wstransport.nim @@ -238,6 +238,10 @@ method accept*(self: WsTransport): Future[Connection] {.async, gcsafe.} = raise exc except TransportOsError as exc: debug "OS Error", exc = exc.msg + except WebSocketError as exc: + debug "Websocket Error", exc = exc.msg + except AsyncStreamError as exc: + debug "AsyncStream Error", exc = exc.msg except TransportTooManyError as exc: debug "Too many files opened", exc = exc.msg except TransportUseClosedError as exc: