From 93cb091894f917b84fd945aba5394ffa6814ca03 Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Sat, 19 Apr 2014 16:51:12 +0800 Subject: [PATCH] assert service name is string --- service/service_mgr.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/service/service_mgr.lua b/service/service_mgr.lua index 44d85d5b..09994d0f 100644 --- a/service/service_mgr.lua +++ b/service/service_mgr.lua @@ -77,6 +77,7 @@ function cmd.LAUNCH(global, service_name, ...) if global == true then return GLAUNCH(service_name, ...) else + assert(type(global) == "string") return waitfor(global, skynet.newservice, global, service_name, ...) end end @@ -84,8 +85,10 @@ end function cmd.QUERY(global, service_name) if global == true then return GQUERY(service_name) + else + assert(type(global) == "string") + return waitfor(global) end - return waitfor(global) end skynet.start(function()