From c7298f34f479c915bb70cf444e2995210446b302 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Mon, 1 Jun 2020 17:19:53 -0600 Subject: [PATCH] additional comments --- libp2p/muxers/mplex/lpchannel.nim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libp2p/muxers/mplex/lpchannel.nim b/libp2p/muxers/mplex/lpchannel.nim index cff668e6c..a753d16c4 100644 --- a/libp2p/muxers/mplex/lpchannel.nim +++ b/libp2p/muxers/mplex/lpchannel.nim @@ -127,6 +127,8 @@ proc newChannel*(id: uint64, name = result.name proc closeMessage(s: LPChannel) {.async.} = + ## send close message - this will not raise + ## on EOF or Closed withEOFExceptions: withWriteLock(s.writeLock): trace "sending close message", id = s.id, @@ -137,6 +139,7 @@ proc closeMessage(s: LPChannel) {.async.} = await s.conn.writeMsg(s.id, s.closeCode) # write close proc resetMessage(s: LPChannel) {.async.} = + ## send reset message - this will not raise withEOFExceptions: withWriteLock(s.writeLock): trace "sending reset message", id = s.id,