assert service name is string

This commit is contained in:
Cloud Wu
2014-04-19 16:51:12 +08:00
parent 2d56a2215a
commit 93cb091894

View File

@@ -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()