From 68eb142a7c783daa06d86fdb91aa38fb95b805c4 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Sat, 28 Sep 2019 13:54:16 -0600 Subject: [PATCH] end multiplex read loop on exception --- libp2p/multistream.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libp2p/multistream.nim b/libp2p/multistream.nim index 5fdbed48d..e2f9d71d0 100644 --- a/libp2p/multistream.nim +++ b/libp2p/multistream.nim @@ -136,13 +136,14 @@ proc handle*(m: MultisteamSelect, conn: Connection) {.async, gcsafe.} = else: for h in m.handlers: if (not isNil(h.match) and h.match(ms)) or ms == h.proto: - trace "found handler for", protocol = ms + trace "found handler for", protocol = ms await conn.writeLp((h.proto & "\n")) try: await h.protocol.handler(conn, ms) return except Exception as exc: warn "exception while handling ", msg = exc.msg + return warn "no handlers for ", protocol = ms await conn.write(m.na)