From 155bec0562056fcf659f6c50228de4a6f6b463eb Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Mon, 9 Sep 2019 16:40:14 -0400 Subject: [PATCH] Fix initiator flag during secio upgrade --- libp2p/security/secio/transport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libp2p/security/secio/transport.py b/libp2p/security/secio/transport.py index 3dc6534..e223a94 100644 --- a/libp2p/security/secio/transport.py +++ b/libp2p/security/secio/transport.py @@ -409,7 +409,7 @@ async def create_secure_session( await conn.close() raise e - initiator = remote_peer is None + initiator = remote_peer is not None session = _mk_session_from(local_private_key, session_parameters, msg_io, initiator) received_nonce = await _finish_handshake(session, remote_nonce)