81-serparate-procs

- nil dereference again
This commit is contained in:
Tim Beatham 2024-01-04 22:29:30 +00:00
parent 69b1790bb6
commit 2b73d241b6
2 changed files with 3 additions and 3 deletions

View File

@ -107,7 +107,7 @@ func NewCtrlServer(params *NewCtrlServerParams) (*MeshCtrlServer, error) {
logging.Log.WriteErrorf(err.Error())
}
return err
return nil
}, 1)
heartbeatTimer := lib.NewTimer(func() error {

View File

@ -234,8 +234,8 @@ func (m *WgMeshConfigApplyer) getClientConfig(params *GetConfigParams) (*wgtypes
routesForMesh := lib.Map(lib.MapValues(params.routes), func(rns []routeNode) []routeNode {
return lib.Filter(rns, func(rn routeNode) bool {
_, ipNet, _ := net.ParseCIDR(rn.gateway)
return meshNet.Contains(ipNet.IP) || ipNet.Contains(meshNet.IP)
node, err := params.mesh.GetNode(rn.gateway)
return node != nil && err == nil
})
})