mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
assert service name is string
This commit is contained in:
@@ -77,6 +77,7 @@ function cmd.LAUNCH(global, service_name, ...)
|
|||||||
if global == true then
|
if global == true then
|
||||||
return GLAUNCH(service_name, ...)
|
return GLAUNCH(service_name, ...)
|
||||||
else
|
else
|
||||||
|
assert(type(global) == "string")
|
||||||
return waitfor(global, skynet.newservice, global, service_name, ...)
|
return waitfor(global, skynet.newservice, global, service_name, ...)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -84,8 +85,10 @@ end
|
|||||||
function cmd.QUERY(global, service_name)
|
function cmd.QUERY(global, service_name)
|
||||||
if global == true then
|
if global == true then
|
||||||
return GQUERY(service_name)
|
return GQUERY(service_name)
|
||||||
|
else
|
||||||
|
assert(type(global) == "string")
|
||||||
|
return waitfor(global)
|
||||||
end
|
end
|
||||||
return waitfor(global)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
skynet.start(function()
|
skynet.start(function()
|
||||||
|
|||||||
Reference in New Issue
Block a user