From 64cdbbabbc8a6aa67faec4d124d2092c846c41e7 Mon Sep 17 00:00:00 2001 From: vyzo Date: Tue, 20 Feb 2018 18:23:28 +0200 Subject: [PATCH] remove pending gossip and control messages on RemovePeer --- gossipsub.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gossipsub.go b/gossipsub.go index 5a02f63..03cd928 100644 --- a/gossipsub.go +++ b/gossipsub.go @@ -68,6 +68,8 @@ func (gs *GossipSubRouter) RemovePeer(p peer.ID) { for _, peers := range gs.fanout { delete(peers, p) } + delete(gs.gossip, p) + delete(gs.control, p) } func (gs *GossipSubRouter) HandleRPC(rpc *RPC) {