mirror of
https://github.com/status-im/nim-libp2p.git
synced 2025-01-11 13:34:26 +00:00
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…
x
Reference in New Issue
Block a user