mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-13 00:24:31 +08:00
Merge pull request #678 from gravitl/feature_v0.10.0_route_consolidate
moved check outside loop
This commit is contained in:
commit
e9aa94bab5
1 changed files with 2 additions and 2 deletions
|
@ -177,8 +177,8 @@ func InitWireguard(node *models.Node, privkey string, peers []wgtypes.PeerConfig
|
|||
ncutils.PrintLog("waiting for interface...", 1) // ensure interface is created
|
||||
output, _ := ncutils.RunCmd("wg", false)
|
||||
starttime := time.Now()
|
||||
ifaceReady := false
|
||||
for !strings.Contains(output, ifacename) && !(time.Now().After(starttime.Add(time.Second << 4))) {
|
||||
ifaceReady := !strings.Contains(output, ifacename)
|
||||
for !ifaceReady && !(time.Now().After(starttime.Add(time.Second << 4))) {
|
||||
output, _ = ncutils.RunCmd("wg", false)
|
||||
err = ApplyConf(node, ifacename, confPath)
|
||||
time.Sleep(time.Second)
|
||||
|
|
Loading…
Add table
Reference in a new issue