Merge pull request #789 from gravitl/bugfix_v0.10.1_clientfix

Bugfix v0.10.1 clientfix
This commit is contained in:
dcarns 2022-02-16 21:36:43 -05:00 committed by GitHub
commit 4d45523363
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -107,6 +107,8 @@ func (s *NodeServiceServer) CreateNode(ctx context.Context, req *nodepb.Object)
Type: nodepb.NODE_TYPE,
}
runServerUpdate(&node, true)
go func(node *models.Node) {
if node.UDPHolePunch == "yes" {
var currentServerNode, getErr = logic.GetNetworkServerLeader(node.Network)

View file

@ -215,7 +215,12 @@ func NodeUpdate(client mqtt.Client, msg mqtt.Message) {
}
}
}
publishClientPeers(&cfg)
pubErr := publishClientPeers(&cfg)
if pubErr != nil {
ncutils.Log("could not notify server to update peers after interface change")
} else {
ncutils.Log("signalled peer update to server")
}
}
//deal with DNS
if newNode.DNSOn != "yes" && shouldDNSChange && cfg.Node.Interface != "" {