only do PX on leave if PX was enabled in the node

This commit is contained in:
vyzo 2020-06-15 09:47:50 +03:00
parent e18b4edd9a
commit 8945f91465
1 changed files with 1 additions and 1 deletions

View File

@ -1005,7 +1005,7 @@ func (gs *GossipSubRouter) sendGraft(p peer.ID, topic string) {
}
func (gs *GossipSubRouter) sendPrune(p peer.ID, topic string) {
prune := []*pb.ControlPrune{gs.makePrune(p, topic, true)}
prune := []*pb.ControlPrune{gs.makePrune(p, topic, gs.doPX)}
out := rpcWithControl(nil, nil, nil, nil, prune)
gs.sendRPC(p, out)
}