mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
fix: 修复升级lua5.5后的兼容性错误 (#2123)
This commit is contained in:
@@ -992,19 +992,19 @@ function skynet.newservice(name, ...)
|
||||
return skynet.call(".launcher", "lua" , "LAUNCH", "snlua", name, ...)
|
||||
end
|
||||
|
||||
function skynet.uniqueservice(global, ...)
|
||||
if global == true then
|
||||
function skynet.uniqueservice(name, ...)
|
||||
if name == true then
|
||||
return assert(skynet.call(".service", "lua", "GLAUNCH", ...))
|
||||
else
|
||||
return assert(skynet.call(".service", "lua", "LAUNCH", global, ...))
|
||||
return assert(skynet.call(".service", "lua", "LAUNCH", name, ...))
|
||||
end
|
||||
end
|
||||
|
||||
function skynet.queryservice(global, ...)
|
||||
if global == true then
|
||||
function skynet.queryservice(name, ...)
|
||||
if name == true then
|
||||
return assert(skynet.call(".service", "lua", "GQUERY", ...))
|
||||
else
|
||||
return assert(skynet.call(".service", "lua", "QUERY", global, ...))
|
||||
return assert(skynet.call(".service", "lua", "QUERY", name, ...))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user