浏览代码

修改节点分配

neo 1 年之前
父节点
当前提交
e6229c5c79
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 2 2
      common/utils/nodeUtil.lua
  2. 1 0
      nodes/gate/service/srvSprotoAgent.lua

+ 2 - 2
common/utils/nodeUtil.lua

@@ -76,7 +76,7 @@ end
76 76
 ----------------------------------------
77 77
 -- 分配游戏服节点/agent
78 78
 function root:user_dispatch_game_node_and_agent(uid)
79
-	local nodeInfo = self:call_to_node("master", ".srvNodeMgr", "user_dispatch_cluster_node", "game", uid)
79
+	local nodeInfo = self:call_to_node("master", ".srvNodeMgr", "user_dispatch_cluster_node", uid, "game")
80 80
 	if is_empty(nodeInfo) or is_empty(nodeInfo.nodeName) then
81 81
 		return
82 82
 	end
@@ -94,7 +94,7 @@ function root:user_dispatch_game_node_and_agent(uid)
94 94
 end
95 95
 -- 分配网关节点/agent
96 96
 function root:user_dispatch_gate_node_and_agent(uid)
97
-	local nodeInfo = self:call_to_node("master", ".srvNodeMgr", "user_dispatch_cluster_node", "gate", uid)
97
+	local nodeInfo = self:call_to_node("master", ".srvNodeMgr", "user_dispatch_cluster_node", uid, "gate")
98 98
 	if is_empty(nodeInfo) or is_empty(nodeInfo.nodeName) then
99 99
 		return
100 100
 	end

+ 1 - 0
nodes/gate/service/srvSprotoAgent.lua

@@ -94,6 +94,7 @@ function CMD.login(uid, fd)
94 94
     else
95 95
         -- 分配游戏服节点/agent
96 96
         local gameNode, gameAgent = nodeUtil:user_dispatch_game_node_and_agent(uid)
97
+        log.info("login uid[%s] gameNode[%s] gameAgent[%s]", tostring(uid), tostring(gameNode), tostring(gameAgent))
97 98
 
98 99
         session = {
99 100
             fd = fd,