Apply suggestions from code review
Co-Authored-By: NIC Lin <twedusuck@gmail.com>
This commit is contained in:
parent
0b62321265
commit
2a1367b011
|
@ -60,7 +60,7 @@ class InsecureTransport(BaseSecureTransport):
|
|||
await session.run_handshake()
|
||||
# TODO: Check if `remote_public_key is not None`. If so, check if `session.remote_peer`
|
||||
received_peer_id = session.get_remote_peer()
|
||||
if session.get_remote_peer() != peer_id:
|
||||
if received_peer_id != peer_id:
|
||||
raise UpgradeFailure(
|
||||
"remote peer sent unexpected peer ID. "
|
||||
f"expected={peer_id} received={received_peer_id}"
|
||||
|
|
Loading…
Reference in New Issue
Block a user