From d7b21859d5addd548887a3d13ecca76b9dbe7857 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 16 Apr 2018 19:12:48 -0700 Subject: [PATCH] server: upon disconnect, prune peer query state from gossiper --- server.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server.go b/server.go index 5a492e5b4..49027332e 100644 --- a/server.go +++ b/server.go @@ -1305,6 +1305,10 @@ func (s *server) peerTerminationWatcher(p *peer) { // available for use. s.fundingMgr.CancelPeerReservations(p.PubKey()) + // We'll also inform the gossiper that this peer is no longer active, + // so we don't need to maintain sync state for it any longer. + s.authGossiper.PruneSyncState(p.addr.IdentityKey) + // Tell the switch to remove all links associated with this peer. // Passing nil as the target link indicates that all links associated // with this interface should be closed.