mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
multi: return error if connecting to remote sub-server fails
This commit is contained in:
parent
daab70c040
commit
2a825f1009
2 changed files with 8 additions and 5 deletions
|
|
@ -84,7 +84,7 @@ func (s *Manager) StartIntegratedServers(lndClient lnrpc.LightningClient,
|
|||
|
||||
// ConnectRemoteSubServers creates connections to all the manager's sub-servers
|
||||
// that are running remotely.
|
||||
func (s *Manager) ConnectRemoteSubServers() {
|
||||
func (s *Manager) ConnectRemoteSubServers() error {
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
|
||||
|
|
@ -95,12 +95,12 @@ func (s *Manager) ConnectRemoteSubServers() {
|
|||
|
||||
err := ss.connectRemote()
|
||||
if err != nil {
|
||||
log.Errorf("Failed to connect to remote %s: %v",
|
||||
return fmt.Errorf("failed to connect to remote %s: %v",
|
||||
ss.Name(), err)
|
||||
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RegisterRPCServices registers all the manager's sub-servers with the given
|
||||
|
|
|
|||
|
|
@ -491,7 +491,10 @@ func (g *LightningTerminal) start() error {
|
|||
|
||||
// Initialise any connections to sub-servers that we are running in
|
||||
// remote mode.
|
||||
g.subServerMgr.ConnectRemoteSubServers()
|
||||
if err := g.subServerMgr.ConnectRemoteSubServers(); err != nil {
|
||||
return fmt.Errorf("error connecting to remote sub-servers: %v",
|
||||
err)
|
||||
}
|
||||
|
||||
// Now start the RPC proxy that will handle all incoming gRPC, grpc-web
|
||||
// and REST requests.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue