mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
fixed lint
This commit is contained in:
committed by
Paul Robinson
parent
cd810d26c2
commit
25b35dee1a
@ -26,13 +26,13 @@ async def handle_ping(stream: INetStream) -> None:
|
||||
try:
|
||||
payload = await stream.read(PING_LENGTH)
|
||||
peer_id = stream.muxed_conn.peer_id
|
||||
if payload != None:
|
||||
if payload is not None:
|
||||
print(f"received ping from {peer_id}")
|
||||
|
||||
await stream.write(payload)
|
||||
print(f"responded with pong to {peer_id}")
|
||||
|
||||
except:
|
||||
except Exception:
|
||||
await stream.reset()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user