mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loopd: log correct error if daemon start fails
This commit is contained in:
parent
cc26813f24
commit
bd6271e633
1 changed files with 4 additions and 4 deletions
|
|
@ -64,15 +64,15 @@ type ListenerCfg struct {
|
|||
|
||||
// Daemon is the struct that holds one instance of the loop client daemon.
|
||||
type Daemon struct {
|
||||
// To be used atomically. Declared first to optimize struct alignment.
|
||||
started int32
|
||||
|
||||
// swapClientServer is the embedded RPC server that satisfies the client
|
||||
// RPC interface. We embed this struct so the Daemon itself can be
|
||||
// registered to an existing grpc.Server to run as a subserver in the
|
||||
// same process.
|
||||
swapClientServer
|
||||
|
||||
// To be used atomically.
|
||||
started int32
|
||||
|
||||
// ErrChan is an error channel that users of the Daemon struct must use
|
||||
// to detect runtime errors and also whether a shutdown is fully
|
||||
// completed.
|
||||
|
|
@ -168,7 +168,7 @@ func (d *Daemon) Start() error {
|
|||
// anything goes wrong now, we need to cleanly shut down again.
|
||||
startErr := d.startWebServers()
|
||||
if startErr != nil {
|
||||
errorf("Error while starting daemon: %v", err)
|
||||
errorf("Error while starting daemon: %v", startErr)
|
||||
d.Stop()
|
||||
stopErr := <-d.ErrChan
|
||||
if stopErr != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue