From b628042e298a2319a0b363b65a72189f7265ebfb Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sat, 20 Jan 2018 09:33:32 -0800 Subject: [PATCH] cmd/routed: syncgroup better --- cmd/routed/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 {