diff --git a/cmd/routed/main.go b/cmd/routed/main.go index 153dc11..638fb96 100644 --- a/cmd/routed/main.go +++ b/cmd/routed/main.go @@ -52,6 +52,7 @@ func main() { } wg := &sync.WaitGroup{} + wg.Add(3) go setupQuic(ctx, wg, s, scfg) go setupTLS(ctx, wg, s, scfg) @@ -121,7 +122,6 @@ func setupQuic(ctx context.Context, wg *sync.WaitGroup, s *Server, scfg Config) s.QuicServer = qs go ln.FatalErr(context.Background(), qs.ListenAndServe()) - wg.Add(1) for { select { @@ -152,7 +152,6 @@ func setupTLS(ctx context.Context, wg *sync.WaitGroup, s *Server, scfg Config) { } go ln.FatalErr(context.Background(), hs.ListenAndServeTLS("", "")) - wg.Add(1) for { select {