mirror of
https://github.com/vacp2p/nim-libp2p.git
synced 2025-01-13 02:04:30 +00:00
fix trace runs in connection
This commit is contained in:
parent
00fbc9246e
commit
f4740c8b8e
@ -40,13 +40,13 @@ proc bindStreamClose(conn: Connection) {.async.} =
|
|||||||
# to ensure correct close propagation
|
# to ensure correct close propagation
|
||||||
if not isNil(conn.stream.closeEvent):
|
if not isNil(conn.stream.closeEvent):
|
||||||
await conn.stream.closeEvent.wait()
|
await conn.stream.closeEvent.wait()
|
||||||
trace "wrapped stream closed, about to close conn", closed = this.isClosed,
|
trace "wrapped stream closed, about to close conn", closed = conn.isClosed,
|
||||||
peer = if not isNil(this.peerInfo):
|
peer = if not isNil(conn.peerInfo):
|
||||||
this.peerInfo.id else: ""
|
conn.peerInfo.id else: ""
|
||||||
if not conn.isClosed:
|
if not conn.isClosed:
|
||||||
trace "wrapped stream closed, closing conn", closed = this.isClosed,
|
trace "wrapped stream closed, closing conn", closed = conn.isClosed,
|
||||||
peer = if not isNil(this.peerInfo):
|
peer = if not isNil(conn.peerInfo):
|
||||||
this.peerInfo.id else: ""
|
conn.peerInfo.id else: ""
|
||||||
asyncCheck conn.close()
|
asyncCheck conn.close()
|
||||||
|
|
||||||
proc init*[T: Connection](self: var T, stream: LPStream): T =
|
proc init*[T: Connection](self: var T, stream: LPStream): T =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user