lnd: remove redundant server shutdown for REST wallet unlock

In this commit, we remove a server shutdown statement that was executed
after we obtained the wallet’s password from the user over RPC. This
was unnecessary as we already close the listener below. Before this
commit, users would see a weird benign error message. With these code
deletion, the message disappears.
This commit is contained in:
Olaoluwa Osuntokun 2018-02-03 17:58:54 -08:00
parent fa478266fc
commit bb174292b1
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

7
lnd.go

@ -756,13 +756,6 @@ func waitForWalletPassword(grpcEndpoints, restEndpoints []string,
}
srv := &http.Server{Handler: mux}
defer func() {
// We must shut down this server, since we'll let
// the regular rpcServer listen on the same address.
if err := srv.Shutdown(ctx); err != nil {
rpcsLog.Errorf("unable to shutdown password gRPC proxy: %v", err)
}
}()
for _, restEndpoint := range restEndpoints {
lis, err := tls.Listen("tcp", restEndpoint, tlsConf)