From bb174292b16efa1e4a750af3f0d1b159241a9890 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Sat, 3 Feb 2018 17:58:54 -0800 Subject: [PATCH] lnd: remove redundant server shutdown for REST wallet unlock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- lnd.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lnd.go b/lnd.go index 73ff86c4..43e3de51 100644 --- a/lnd.go +++ b/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)