mirror of
https://github.com/WiiLink24/wfc-server.git
synced 2026-08-08 11:17:23 -05:00
Fix number of WaitGroup spawned
This commit is contained in:
parent
6d0c656bea
commit
c1b5bc0af0
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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user