Skip to content

Commit

Permalink
lnd: change startup order of authGossiper.
Browse files Browse the repository at this point in the history
  • Loading branch information
ziggie1984 committed Jul 23, 2024
1 parent d24493a commit b3225db
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2026,8 +2026,8 @@ func (s *server) Start() error {
return
}

cleanup = cleanup.add(s.authGossiper.Stop)
if err := s.authGossiper.Start(); err != nil {
cleanup = cleanup.add(s.chanRouter.Stop)
if err := s.chanRouter.Start(); err != nil {
startErr = err
return
}
Expand All @@ -2043,6 +2043,13 @@ func (s *server) Start() error {
startErr = err
return
}
// The authGossiper depends on the chanRouter and therefore
// should be started after it.
cleanup = cleanup.add(s.authGossiper.Stop)
if err := s.authGossiper.Start(); err != nil {
startErr = err
return
}

cleanup = cleanup.add(s.invoices.Stop)
if err := s.invoices.Start(); err != nil {
Expand Down

0 comments on commit b3225db

Please sign in to comment.