rpcserver: request shutdown from signal package
This commit is contained in:
parent
95440bc723
commit
5144df645b
@ -26,6 +26,7 @@ import (
|
|||||||
"github.com/lightningnetwork/lnd/lnwallet"
|
"github.com/lightningnetwork/lnd/lnwallet"
|
||||||
"github.com/lightningnetwork/lnd/lnwire"
|
"github.com/lightningnetwork/lnd/lnwire"
|
||||||
"github.com/lightningnetwork/lnd/routing"
|
"github.com/lightningnetwork/lnd/routing"
|
||||||
|
"github.com/lightningnetwork/lnd/signal"
|
||||||
"github.com/lightningnetwork/lnd/zpay32"
|
"github.com/lightningnetwork/lnd/zpay32"
|
||||||
"github.com/roasbeef/btcd/blockchain"
|
"github.com/roasbeef/btcd/blockchain"
|
||||||
"github.com/roasbeef/btcd/btcec"
|
"github.com/roasbeef/btcd/btcec"
|
||||||
@ -3415,7 +3416,7 @@ func (r *rpcServer) GetNetworkInfo(ctx context.Context,
|
|||||||
func (r *rpcServer) StopDaemon(ctx context.Context,
|
func (r *rpcServer) StopDaemon(ctx context.Context,
|
||||||
_ *lnrpc.StopRequest) (*lnrpc.StopResponse, error) {
|
_ *lnrpc.StopRequest) (*lnrpc.StopResponse, error) {
|
||||||
|
|
||||||
shutdownRequestChannel <- struct{}{}
|
signal.RequestShutdown()
|
||||||
return &lnrpc.StopResponse{}, nil
|
return &lnrpc.StopResponse{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user