mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
fix #979
This commit is contained in:
@@ -143,10 +143,18 @@ function command.proxy(source, node, name)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
local fullname = node .. "." .. name
|
local fullname = node .. "." .. name
|
||||||
if proxy[fullname] == nil then
|
local p = proxy[fullname]
|
||||||
proxy[fullname] = skynet.newservice("clusterproxy", node, name)
|
if p == nil then
|
||||||
|
p = skynet.newservice("clusterproxy", node, name)
|
||||||
|
-- double check
|
||||||
|
if proxy[fullname] then
|
||||||
|
skynet.kill(p)
|
||||||
|
p = proxy[fullname]
|
||||||
|
else
|
||||||
|
proxy[fullname] = p
|
||||||
|
end
|
||||||
end
|
end
|
||||||
skynet.ret(skynet.pack(proxy[fullname]))
|
skynet.ret(skynet.pack(p))
|
||||||
end
|
end
|
||||||
|
|
||||||
local cluster_agent = {} -- fd:service
|
local cluster_agent = {} -- fd:service
|
||||||
|
|||||||
Reference in New Issue
Block a user