Fix number of WaitGroup spawned

This commit is contained in:
Sketch 2024-04-03 12:25:05 -04:00
parent 6d0c656bea
commit c1b5bc0af0

View File

@ -21,7 +21,7 @@ func main() {
wg := &sync.WaitGroup{}
actions := []func(){nas.StartServer, gpcm.StartServer, qr2.StartServer, gpsp.StartServer, serverbrowser.StartServer, sake.StartServer, natneg.StartServer, api.StartServer, gamestats.StartServer}
wg.Add(5)
wg.Add(len(actions))
for _, action := range actions {
go func(ac func()) {
defer wg.Done()