diff --git a/libp2p/muxers/mplex/lpchannel.nim b/libp2p/muxers/mplex/lpchannel.nim index a5a00a4..cf1e962 100644 --- a/libp2p/muxers/mplex/lpchannel.nim +++ b/libp2p/muxers/mplex/lpchannel.nim @@ -77,6 +77,7 @@ proc newChannel*(id: uint64, result.msgCode = if initiator: MessageType.MsgOut else: MessageType.MsgIn result.closeCode = if initiator: MessageType.CloseOut else: MessageType.CloseIn result.resetCode = if initiator: MessageType.ResetOut else: MessageType.ResetIn + result.writeLock = newAsyncLock() result.isLazy = lazy let chan = result @@ -177,7 +178,6 @@ method close*(s: LPChannel) {.async, gcsafe.} = s.closedLocal = true if s.atEof: # already closed by remote close parent buffer imediately await procCall BufferStream(s).close() - trace "lpchannel closed local", id = s.id, initiator = s.initiator, name = s.name,