mirror of https://github.com/vacp2p/nim-libp2p.git
don't send close message if remote closed
This commit is contained in:
parent
f6c4d2130a
commit
f9ad113d11
|
@ -62,7 +62,8 @@ proc newChannel*(id: uint,
|
|||
result.initBufferStream(writeHandler, size)
|
||||
|
||||
proc closeMessage(s: LPChannel) {.async.} =
|
||||
await s.conn.writeMsg(s.id, s.closeCode) # write header
|
||||
if not s.closed:
|
||||
await s.conn.writeMsg(s.id, s.closeCode) # write header
|
||||
|
||||
proc closedByRemote*(s: LPChannel) {.async.} =
|
||||
s.closedRemote = true
|
||||
|
|
Loading…
Reference in New Issue