discovery: if gossipSyncer is shutting down, don't filter messages

This commit is contained in:
Olaoluwa Osuntokun 2018-06-04 17:18:48 -07:00
parent 0ec4a06e6b
commit e6d46f681b
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -805,6 +805,12 @@ func (g *gossipSyncer) FilterGossipMsgs(msgs ...msgWithSenders) {
return return
} }
// If we've been signalled to exit, or are exiting, then we'll stop
// short.
if atomic.LoadUint32(&g.stopped) == 1 {
return
}
// TODO(roasbeef): need to ensure that peer still online...send msg to // TODO(roasbeef): need to ensure that peer still online...send msg to
// gossiper on peer termination to signal peer disconnect? // gossiper on peer termination to signal peer disconnect?