fix: converted from select to waitGroups.

This commit is contained in:
James Wells 2021-10-04 13:06:09 -07:00
parent e61e6d2994
commit f7cba2689c
Signed by: jwells
GPG key ID: 73196D10B8E65666
8 changed files with 75 additions and 31 deletions

View file

@ -3,6 +3,7 @@ package worker
import (
"fmt"
"log"
"sync"
gs "git.dragonheim.net/dragonheim/gagent/internal/gstructs"
@ -11,7 +12,8 @@ import (
)
// Main is the initiation function for a Worker
func Main(config gs.GagentConfig, rid int) {
func Main(wg *sync.WaitGroup, config gs.GagentConfig, rid int) {
defer wg.Done()
log.Printf("[INFO] Starting worker\n")
// Generate connect string for this router.