mirror of
https://github.com/WiiLink24/wfc-server.git
synced 2026-08-26 18:44:57 -05:00
Fix number of WaitGroup spawned
This commit is contained in:
2
main.go
2
main.go
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user