mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-05 00:43:58 +08:00
ensure new listen port is written to config files and mq uses comms network
This commit is contained in:
@@ -215,7 +215,7 @@ func JoinNetwork(cfg config.ClientConfig, privateKey string, iscomms bool) error
|
||||
|
||||
setListenPort(oldListenPort, &cfg)
|
||||
|
||||
err = config.ModConfig(&node)
|
||||
err = config.ModConfig(&cfg.Node)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -298,7 +298,6 @@ func setListenPort(oldListenPort int32, cfg *config.ClientConfig) {
|
||||
// if newListenPort has been modified to find an available port, publish to server
|
||||
if cfg.Node.ListenPort != newListenPort {
|
||||
var currentCommsCfg = getCommsCfgByNode(&cfg.Node)
|
||||
log.Println("DELETE ME: publishing update of port: " + string(cfg.Node.ListenPort))
|
||||
PublishNodeUpdate(¤tCommsCfg, cfg)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user