diff --git a/libp2p/muxers/yamux/yamux.nim b/libp2p/muxers/yamux/yamux.nim index fc50c07d5..de0574af7 100644 --- a/libp2p/muxers/yamux/yamux.nim +++ b/libp2p/muxers/yamux/yamux.nim @@ -219,7 +219,7 @@ proc reset(channel: YamuxChannel, isLocal: bool = false) {.async.} = channel.recvQueue = @[] channel.sendWindow = 0 if not channel.closedLocally: - if isLocal: + if isLocal and not channel.isSending: try: await channel.conn.write(YamuxHeader.data(channel.id, 0, {Rst})) except LPStreamEOFError as exc: discard except LPStreamClosedError as exc: discard