From d9982df3feb5b24cd7e9f74fcc2f96321059e649 Mon Sep 17 00:00:00 2001 From: Fran Bull Date: Wed, 29 Jan 2025 09:14:03 -0800 Subject: [PATCH] lns get closed by serve, so they're not wanted, but shutdown still hangs --- tsconsensus/monitor.go | 1 - tsconsensus/tsconsensus.go | 1 - 2 files changed, 2 deletions(-) diff --git a/tsconsensus/monitor.go b/tsconsensus/monitor.go index 9e90fef38..c32ea4430 100644 --- a/tsconsensus/monitor.go +++ b/tsconsensus/monitor.go @@ -50,7 +50,6 @@ func serveMonitor(c *Consensus, ts *tsnet.Server, listenAddr string) (*http.Serv mux.HandleFunc("/dial", m.handleDial) srv := &http.Server{Handler: mux} go func() { - defer ln.Close() err := srv.Serve(ln) log.Printf("MonitorHTTP stopped serving with error: %v", err) }() diff --git a/tsconsensus/tsconsensus.go b/tsconsensus/tsconsensus.go index 9826bac29..3dcc380b1 100644 --- a/tsconsensus/tsconsensus.go +++ b/tsconsensus/tsconsensus.go @@ -304,7 +304,6 @@ func (c *Consensus) serveCmdHttp(ts *tsnet.Server) (*http.Server, error) { mux := c.makeCommandMux() srv := &http.Server{Handler: mux} go func() { - defer ln.Close() err := srv.Serve(ln) log.Printf("CmdHttp stopped serving with err: %v", err) }()