mirror of
https://github.com/gravitl/netmaker.git
synced 2025-11-12 09:40:46 +08:00
address code review comment
This commit is contained in:
parent
7ec8c4be2a
commit
0ba3f6feaf
2 changed files with 3 additions and 3 deletions
|
|
@ -87,8 +87,6 @@ func Daemon() error {
|
||||||
|
|
||||||
func startGoRoutines(wg *sync.WaitGroup) context.CancelFunc {
|
func startGoRoutines(wg *sync.WaitGroup) context.CancelFunc {
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
wg.Add(1)
|
|
||||||
go Checkin(ctx, wg)
|
|
||||||
serverSet := make(map[string]bool)
|
serverSet := make(map[string]bool)
|
||||||
networks, _ := ncutils.GetSystemNetworks()
|
networks, _ := ncutils.GetSystemNetworks()
|
||||||
for _, network := range networks {
|
for _, network := range networks {
|
||||||
|
|
@ -116,6 +114,8 @@ func startGoRoutines(wg *sync.WaitGroup) context.CancelFunc {
|
||||||
go messageQueue(ctx, wg, &cfg)
|
go messageQueue(ctx, wg, &cfg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
wg.Add(1)
|
||||||
|
go Checkin(ctx, wg)
|
||||||
return cancel
|
return cancel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -438,7 +438,7 @@ func RunCmds(commands []string, printerr bool) error {
|
||||||
var err error
|
var err error
|
||||||
for _, command := range commands {
|
for _, command := range commands {
|
||||||
//prevent panic
|
//prevent panic
|
||||||
if command == " " {
|
if len(strings.Trim(command, " ")) == 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
args := strings.Fields(command)
|
args := strings.Fields(command)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue