rpcmiddleware: thread context through to Start

This commit is contained in:
Elle Mouton 2025-01-13 07:04:36 +02:00
parent 21983bab75
commit 83a3209a32
No known key found for this signature in database
GPG key ID: D7D916376026F177
2 changed files with 3 additions and 3 deletions

View file

@ -36,8 +36,8 @@ func NewManager(interceptTimeout time.Duration,
}
// Start starts the firewall by registering the interceptors with lnd.
func (f *Manager) Start() error {
ctxc, cancel := context.WithCancel(context.Background())
func (f *Manager) Start(ctx context.Context) error {
ctxc, cancel := context.WithCancel(ctx)
f.cancel = cancel
for _, i := range f.interceptors {

View file

@ -1104,7 +1104,7 @@ func (g *LightningTerminal) startInternalSubServers(ctx context.Context,
g.lndClient.Client, g.errQueue.ChanIn(), mw...,
)
if err = g.middleware.Start(); err != nil {
if err = g.middleware.Start(ctx); err != nil {
return err
}
g.middlewareStarted = true