Apply PR feedback:

Only use pop method if error handling is in place
This commit is contained in:
NIC619
2019-11-23 16:04:22 +08:00
parent 501eef59de
commit e355cb2600
2 changed files with 4 additions and 4 deletions

View File

@ -292,7 +292,7 @@ class GossipSub(IPubsubRouter):
await self.emit_prune(topic, peer)
# Forget mesh[topic]
self.mesh.pop(topic, None)
del self.mesh[topic]
# Heartbeat
async def heartbeat(self) -> None: