Skip to content

Commit 83a3209

Browse files
committed
rpcmiddleware: thread context through to Start
1 parent 21983ba commit 83a3209

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

rpcmiddleware/manager.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ func NewManager(interceptTimeout time.Duration,
3636
}
3737

3838
// Start starts the firewall by registering the interceptors with lnd.
39-
func (f *Manager) Start() error {
40-
ctxc, cancel := context.WithCancel(context.Background())
39+
func (f *Manager) Start(ctx context.Context) error {
40+
ctxc, cancel := context.WithCancel(ctx)
4141
f.cancel = cancel
4242

4343
for _, i := range f.interceptors {

terminal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,7 @@ func (g *LightningTerminal) startInternalSubServers(ctx context.Context,
11041104
g.lndClient.Client, g.errQueue.ChanIn(), mw...,
11051105
)
11061106

1107-
if err = g.middleware.Start(); err != nil {
1107+
if err = g.middleware.Start(ctx); err != nil {
11081108
return err
11091109
}
11101110
g.middlewareStarted = true

0 commit comments

Comments
 (0)