mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
add skynet.pcall for hotfix use (call a function with require)
This commit is contained in:
@@ -44,7 +44,7 @@ function CMD.new(name, t)
|
||||
elseif dt == "string" then
|
||||
value = setmetatable({}, env_mt)
|
||||
local f = load(t, "=" .. name, "t", value)
|
||||
f()
|
||||
assert(skynet.pcall(f))
|
||||
setmetatable(value, nil)
|
||||
elseif dt == "nil" then
|
||||
value = {}
|
||||
|
||||
Reference in New Issue
Block a user