lnd: close the wallet unlock grpc server

The server was kept alive long after it stopped being used. This caused
problems for services using long-lived GRPC connections which might be
created before wallet unlocked. They got stuck connected to the wallet
unlock service needing a restart.
This commit is contained in:
Juan Pablo Civile 2019-05-08 17:07:26 -03:00
parent 7767eecbb8
commit 88400f5b09

1
lnd.go
View File

@ -879,6 +879,7 @@ func waitForWalletPassword(grpcEndpoints, restEndpoints []net.Addr,
// Set up a new PasswordService, which will listen for passwords
// provided over RPC.
grpcServer := grpc.NewServer(serverOpts...)
defer grpcServer.GracefulStop()
chainConfig := cfg.Bitcoin
if registeredChains.PrimaryChain() == litecoinChain {