diff --git a/libp2p/muxers/mplex/lpchannel.nim b/libp2p/muxers/mplex/lpchannel.nim index cc37083..f577f63 100644 --- a/libp2p/muxers/mplex/lpchannel.nim +++ b/libp2p/muxers/mplex/lpchannel.nim @@ -80,32 +80,11 @@ proc reset*(s: LPChannel) {.async, gcsafe.} = return s.isClosed = true + s.closedLocal = true trace "Resetting channel", s, len = s.len - # First, make sure any new calls to `readOnce` and `pushData` etc will fail - - # there may already be such calls in the event queue however - s.closedLocal = true - s.isEof = true - s.readBuf = StreamSeq() - s.pushedEof = true - - let pushing = s.pushing # s.pushing changes while iterating - for i in 0..