mirror of https://github.com/vacp2p/nim-libp2p.git
in yamux, do not write `{Rst}` packet to stream that's in use (#1041)
This commit is contained in:
parent
9059a8aced
commit
ee264fdf11
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue