mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
rpc_proxy: check hasStarted before using lnd connection
In the rpcProxy `makeDirector` method, we need to check if the rpcProxy has started before making use of the `lndConn`.
This commit is contained in:
parent
ba3193b341
commit
f725c3a959
1 changed files with 6 additions and 0 deletions
|
|
@ -323,6 +323,12 @@ func (p *rpcProxy) makeDirector(allowLitRPC bool) func(ctx context.Context,
|
|||
)
|
||||
}
|
||||
|
||||
// If the rpcProxy has not started yet, then the lnd connection
|
||||
// will not be initialised yet.
|
||||
if !p.hasStarted() {
|
||||
return outCtx, nil, ErrWaitingToStart
|
||||
}
|
||||
|
||||
return outCtx, p.lndConn, nil
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue