mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-05 16:57:51 +08:00
removing peer cache
This commit is contained in:
@@ -69,6 +69,11 @@ func JoinNetwork(cfg config.ClientConfig, privateKey string) error {
|
||||
if cfg.Node.LocalRange != "" && cfg.Node.LocalAddress == "" {
|
||||
log.Println("local vpn, getting local address from range: " + cfg.Node.LocalRange)
|
||||
cfg.Node.LocalAddress = getLocalIP(cfg.Node)
|
||||
} else if cfg.Node.LocalAddress == "" {
|
||||
intIP, err := getPrivateAddr()
|
||||
if err == nil {
|
||||
cfg.Node.LocalAddress = intIP
|
||||
}
|
||||
}
|
||||
|
||||
// set endpoint if blank. set to local if local net, retrieve from function if not
|
||||
@@ -233,6 +238,8 @@ func JoinNetwork(cfg config.ClientConfig, privateKey string) error {
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
} else {
|
||||
daemon.Restart()
|
||||
}
|
||||
|
||||
return err
|
||||
|
Reference in New Issue
Block a user