diff --git a/libp2p/connection.nim b/libp2p/connection.nim index 4ad20e0ae..0d73eac77 100644 --- a/libp2p/connection.nim +++ b/libp2p/connection.nim @@ -40,13 +40,13 @@ proc bindStreamClose(conn: Connection) {.async.} = # to ensure correct close propagation if not isNil(conn.stream.closeEvent): await conn.stream.closeEvent.wait() - trace "wrapped stream closed, about to close conn", closed = this.isClosed, - peer = if not isNil(this.peerInfo): - this.peerInfo.id else: "" + trace "wrapped stream closed, about to close conn", closed = conn.isClosed, + peer = if not isNil(conn.peerInfo): + conn.peerInfo.id else: "" if not conn.isClosed: - trace "wrapped stream closed, closing conn", closed = this.isClosed, - peer = if not isNil(this.peerInfo): - this.peerInfo.id else: "" + trace "wrapped stream closed, closing conn", closed = conn.isClosed, + peer = if not isNil(conn.peerInfo): + conn.peerInfo.id else: "" asyncCheck conn.close() proc init*[T: Connection](self: var T, stream: LPStream): T =