lns get closed by serve, so they're not wanted, but shutdown still hangs

This commit is contained in:
Fran Bull committed 2025-02-19 12:58:21 -08:00
1 parent 01e90c6565
commit d9982df3fe
2 files changed
-2

No files matched your search

-1
View File
@@ -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)
}()
-1
View File
@@ -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)
}()