lnd: ensure the gRPC listener is closed once the daemon exits

This commit is contained in:
Olaoluwa Osuntokun 2016-11-16 12:42:00 -08:00
parent 3e4981d15f
commit 8053f841e4
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2

1
lnd.go
View File

@ -181,6 +181,7 @@ func lndMain() error {
fmt.Printf("failed to listen: %v", err)
return err
}
defer lis.Close()
go func() {
rpcsLog.Infof("RPC server listening on %s", lis.Addr())
grpcServer.Serve(lis)