fixing windows join issue

This commit is contained in:
afeiszli
2022-03-15 11:11:22 -04:00
parent b73272bdee
commit fbb18d86d0
3 changed files with 5 additions and 1 deletions

View File

@@ -109,6 +109,9 @@ func NodeUpdate(client mqtt.Client, msg mqtt.Message) {
}
if ifaceDelta { // if a change caused an ifacedelta we need to notify the server to update the peers
ncutils.Log("applying WG conf to " + file)
if ncutils.IsWindows() {
wireguard.RemoveConfGraceful(nodeCfg.Node.Interface)
}
err = wireguard.ApplyConf(&nodeCfg.Node, nodeCfg.Node.Interface, file)
if err != nil {
ncutils.Log("error restarting wg after node update " + err.Error())