From b0f937a19e8980d668b0ca8d3818b7bc56e818a0 Mon Sep 17 00:00:00 2001 From: Urjit Singh Bhatia Date: Fri, 21 Jun 2024 18:02:29 -0700 Subject: [PATCH] dont block on httptest.Server.Start when serveFlag is present The presence of the `httptest.serve=` flag seems to switch the expectation of how the `httptest.Server.Start()` works since it is currently blocking after printing the url. Unless I am missing something, we don't really need that blocking `select {}` after the print. --- src/net/http/httptest/server.go | 1 - 1 file changed, 1 deletion(-) diff --git a/src/net/http/httptest/server.go b/src/net/http/httptest/server.go index fa549231796..54177288b17 100644 --- a/src/net/http/httptest/server.go +++ b/src/net/http/httptest/server.go @@ -134,7 +134,6 @@ func (s *Server) Start() { s.goServe() if serveFlag != "" { fmt.Fprintln(os.Stderr, "httptest: serving on", s.URL) - select {} } }