mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 14:22:37 +01:00
discovery+peer: add logs to reveal shutdown flow
Also adds a `TODO` for checking the err chan.
This commit is contained in:
parent
8dceb739ff
commit
716c685f10
5 changed files with 12 additions and 0 deletions
|
@ -658,6 +658,7 @@ func (d *AuthenticatedGossiper) Stop() error {
|
|||
|
||||
func (d *AuthenticatedGossiper) stop() {
|
||||
log.Info("Authenticated Gossiper is stopping")
|
||||
defer log.Info("Authenticated Gossiper stopped")
|
||||
|
||||
d.blockEpochs.Cancel()
|
||||
|
||||
|
|
|
@ -84,6 +84,9 @@ func (s *reliableSender) Start() error {
|
|||
// Stop halts the reliable sender from sending messages to peers.
|
||||
func (s *reliableSender) Stop() {
|
||||
s.stop.Do(func() {
|
||||
log.Debugf("reliableSender is stopping")
|
||||
defer log.Debugf("reliableSender stopped")
|
||||
|
||||
close(s.quit)
|
||||
s.wg.Wait()
|
||||
})
|
||||
|
|
|
@ -183,6 +183,9 @@ func (m *SyncManager) Start() {
|
|||
// Stop stops the SyncManager from performing its duties.
|
||||
func (m *SyncManager) Stop() {
|
||||
m.stop.Do(func() {
|
||||
log.Debugf("SyncManager is stopping")
|
||||
defer log.Debugf("SyncManager stopped")
|
||||
|
||||
close(m.quit)
|
||||
m.wg.Wait()
|
||||
|
||||
|
|
|
@ -450,6 +450,9 @@ func (g *GossipSyncer) Start() {
|
|||
// exited.
|
||||
func (g *GossipSyncer) Stop() {
|
||||
g.stopped.Do(func() {
|
||||
log.Debugf("Stopping GossipSyncer(%x)", g.cfg.peerPub[:])
|
||||
defer log.Debugf("GossipSyncer(%x) stopped", g.cfg.peerPub[:])
|
||||
|
||||
close(g.quit)
|
||||
g.wg.Wait()
|
||||
})
|
||||
|
|
|
@ -1401,6 +1401,8 @@ func newChanMsgStream(p *Brontide, cid lnwire.ChannelID) *msgStream {
|
|||
// channel announcements.
|
||||
func newDiscMsgStream(p *Brontide) *msgStream {
|
||||
apply := func(msg lnwire.Message) {
|
||||
// TODO(yy): `ProcessRemoteAnnouncement` returns an error chan
|
||||
// and we need to process it.
|
||||
p.cfg.AuthGossiper.ProcessRemoteAnnouncement(msg, p)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue