mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
Apply PR feedback:
Only use pop method if graceful failure handling is desired
This commit is contained in:
@ -298,7 +298,7 @@ class Pubsub:
|
||||
def _handle_dead_peer(self, peer_id: ID) -> None:
|
||||
if peer_id not in self.peers:
|
||||
return
|
||||
self.peers.pop(peer_id, None)
|
||||
del self.peers[peer_id]
|
||||
|
||||
for topic in self.peer_topics:
|
||||
if peer_id in self.peer_topics[topic]:
|
||||
|
||||
Reference in New Issue
Block a user